Welcome to WebmasterWorld Guest from 54.227.1.130

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

checkbox sending its own value and value from a hidden field?

is it possible

     

bantu

11:48 pm on Mar 6, 2009 (gmt 0)

5+ Year Member



hi,
i have a form with a checkboxes on 1st page. when i press submit button, value of those checkboxes (if they are checked)are shown on the 2nd page. those values are names of the selected items. now,i need 1 more value for every checkbox that can be shown on the 2nd page after submit (for example price of selected item, so thet i can calculate total price). is that possible and how? i'm using PHP

thanks

coopster

7:36 pm on Mar 7, 2009 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to WebmasterWorld, bantu.

Yes, you can carry it through your form as a hidden input field, or in the query string or in a cookie too.

Moby_Dim

7:40 pm on Mar 7, 2009 (gmt 0)

10+ Year Member



You may use javascripting successfully for that purpose. Create onselect or onclick event handlers for your c/boxes where you may assign a value to corresponding hidden field(s). Do not forget to wipe off such values by the same e/handler in the case you've decided to de-check already checked c/box...

bantu

4:09 pm on Mar 8, 2009 (gmt 0)

5+ Year Member



ok, thanks. i did it with hidden field
 

Featured Threads

Hot Threads This Week

Hot Threads This Month