468,514 Members | 1,072 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,514 developers. It's quick & easy.

hidden fields

i have code below-

<input type="hidden" name="totalrecords" value="1">
<input type="hidden" name="totalrecords" value="2">
<input type="hidden" name="totalrecords" value="3">

here name of all the hidden fields are same ,if i want to show second hidden field on next page which has value ="2" how i can show because here the name of hidden fields are same ,so by default it can show the value of first hidden field.so , plz reply me
Mar 4 '12 #1
2 1154
Rabbit
12,513 Expert Mod 8TB
Give them different names.
Mar 4 '12 #2
jhardman
3,405 Expert 2GB
Rabbit is right, having different inputs with the same name is a really bad idea. When you do this the value passed is actually this:
Expand|Select|Wrap|Line Numbers
  1. totalrecords = "1,2,3"
you can then use a split function to separate those values, but really, I can't think of any case where that would be easier than giving the inputs different names.

Jared
Mar 4 '12 #3

Post your reply

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

Similar topics

1 post views Thread by Sam Wuebben | last post: by
5 posts views Thread by Roshawn Dawson | last post: by
3 posts views Thread by HockeyFan | last post: by
5 posts views Thread by HockeyFan | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.