The moose likes HTML, CSS and JavaScript and the fly likes urgent. simple. frustrating......... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "urgent. simple. frustrating........." Watch "urgent. simple. frustrating........." New topic
Author

urgent. simple. frustrating.........

Mishra Anshu
Ranch Hand

Joined: Sep 16, 2003
Posts: 224
Hi!!!
I am sending the name of two textfields as(name1 and name2)...and am
calling a function by passing their names as arguments.
I confirm by alert box that the value is right there.
Now I have to get/set the value of name1 or name 2 textbox depending the
Onchange function called.
But here:--
"form.name.value" looks for something in the form having name as "name" and not "name1" or "name2".
Since I may have 50 or more such name1---50 so,it is desired to somehow
do it in this function (SendData()) in the code shown:---

Plz. help me...It's urgent...
Thanks


"Ignorance is bliss"
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
You need to use a a dynamic string with the form array so you can check the values.
document.FormName["name" + i].value
Hope this helps you out.
Eric
Mishra Anshu
Ranch Hand

Joined: Sep 16, 2003
Posts: 224
Hey Eric!!!
Thanks....

Let me proceed with my code...
For a simple test it has passed..
Will tell you (if any prob) later....
 
 
subject: urgent. simple. frustrating.........
 
Threads others viewed
html text question
Context.xml: how to reference parameter inside the same file
Comparing Strings
Inner SQL
resultset return null
IntelliJ Java IDE