By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,930 Members | 1,323 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,930 IT Pros & Developers. It's quick & easy.

Validate text box value whose name is an array

P: 1
my html code is this:
Expand|Select|Wrap|Line Numbers
  1.                             <input type="text" name="curname[]" id="exRate" value="<?php echo($currency[$i]['rate']);  ?>" onClick="upActive()"> 
  2.  
textbox name is given as array.
how can i validate all values using javascript.
Oct 29 '07 #1
Share this Question
Share on Google+
2 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
my html code is this:
Expand|Select|Wrap|Line Numbers
  1.                             <input type="text" name="curname[]" id="exRate" value="<?php echo($currency[$i]['rate']);  ?>" onClick="upActive()"> 
  2.  
textbox name is given as array.
how can i validate all values using javascript.
This is a javascript question and I am moving it to that forum. When asking your questions, please be sure to post them into the forum that is relevant to their topic.

Regards,

Moderator
Oct 29 '07 #2

acoder
Expert Mod 15k+
P: 16,027
Welcome to TSDN!

I have changed the thread title to better describe the problem.
my html code is this:
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="curname[]" id="exRate" value="<?php echo($currency[$i]['rate']);  ?>" onClick="upActive()"> 
  2.  
textbox name is given as array.
how can i validate all values using javascript.
Since the text box has an id, just use document.getElementById("exRate") to access it. If you want, you can also access it using document.getElementsByName("curname[]")[0].
Oct 29 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.