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
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