-
October 15th, 2011, 12:11 PM #1Junior Member
- Join Date
- Oct 2011
- Posts
- 1
need solution to javascript codes
Please Help!
I have a program where I can get the values for a particular textbox. my problem is.. I want an alert to print the values that has a value that is greater than zero it would not include a value that is equal to zero.. thanks!
This is my code:
<html>
<head>
<script type = "text/javascript">
function functionName() {
var i;
var myElements = new Array();
myElements[0] = document.myForm.myText.value;
myElements[1] = document.myForm.myText1.value;
myElements[2] = document.myForm.myText2.value;
myElements[3] = document.myForm.myText3.value;
var msg = myElements.join('\n');
alert(msg);
}
</script>
</head>
<body>
<form name ="myForm" id="myForm">
<input type = "text" id="myText" name="myText" size="5" value="0" /><br/>
<input type = "text" id="myText1" name="myText1" size="5" value="2" /><br/>
<input type = "text" id="myText2" name="myText2" size="5" value="3" /><br/>
<input type = "text" id="myText3" name="myText3" size="5" value="1" /><br/>
<input type="button" onclick="functionName()" action = "post" value = "submit" />
</form>
</body>
</html>
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Need a ?Javascript solution to iFrames?
By Torrenty in forum Webmastering and ProgrammingReplies: 1Last Post: July 14th, 2008, 12:27 PM



LinkBack URL
About LinkBacks



Reply With Quote

Well you brought up Liberty.
Is It Just Me? v233893843