A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Engineering
»
HTML, CSS and JavaScript
Author
Related to javaScript. Please help
Huzefa Zohaib
Ranch Hand
Joined: Nov 21, 2001
Posts: 40
posted
Sep 03, 2003 21:25:00
0
the following
java
script should give the list of names in the form but is not doing so
<script language="JavaScript"> function sIt(e) { var ml = document.form1; var len = ml.elements.length; for (var i=0; i<len; i++) { var ee=ml.elements[i]; document.writeln (ee.name); }//for } </script>
the page is on
Testing
java script
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56168
13
I like...
posted
Sep 03, 2003 21:53:00
0
Moving to HTML/Javascript.
bear
[
Smart Questions
] [
JSP FAQ
] [
Books by Bear
] [
Bear's FrontMan
] [
About Bear
]
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
6
posted
Sep 04, 2003 06:04:00
0
look at this code:
<script> function CheckNames(){ TheForm=document.forms[0].elements; for(i=0;i<TheForm.length;i++){ var whatName=TheForm[i].getAttribute("name"); alert(whatName); } } </script> <form> <input type="text" name="T1"> <input type="text" name="T2"> <input type="text" name="T3"> <input type="button" name="butt" value="Check Names" onclick="CheckNames()"> </form>
Eric
I agree. Here's the link:
http://aspose.com/file-tools
subject: Related to javaScript. Please help
Similar Threads
How to add year in select
JSP variable typical problem
Adding Javascript global Variables to Http Request Session
Related to javaScript. Please help
Why Won't This HTML Code Validate?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter