Click to See Complete Forum and Search --> : Check the Checkboxes Nitemare


Ian Mac
05-06-2003, 05:01 PM
Hi all,

I am having a problem with setting hidden input entries, or rather creation of them in javascript, dependant on whether a check box has been checked or not.

Basically, I am after having a single check box on a page, that when it is checked, creates a number of other specific named hidden inputs with specific values.

I have seen quite a few ready made scripts that work with checkboxes, by switching there states, but they are created with set names, which doesnt work with the system that the resultant form post will accept for the names and changing the names obviously does not work with the script code that conducts the state changes.

Any of you java script experts got an idea on this. I have just about exhausted every book I have got and the forums, without so much of an incling. I must be having a bad day as this should be a doddle to be honest.

Any and all help would be very much appreciated.

Thanks and all the best,

Mac

khalidali63
05-06-2003, 05:24 PM
doesn't look like a too difficult task,post a link here to your existing page,some one will be able to see the chack box and there names and may come up with a logcal solution for you.

Ian Mac
05-07-2003, 01:33 AM
Hi and thanks for answering,

The URL is:
http://mail.mccabes-online.co.uk/~idmccabe/wp-test.htm

Really need to be able to change the names of the check boxes to names that are acceptable to the script, but with an option to change them in the future, so really not looking for just an answer, but an education for my tired little mind :)

Thanks again,

Mac