Hi,
I have a form which contains within it a group of checkboxes, which for other purposes, the values form part of an array. The function for which this was originally intended works fine but unfortunately I have a preview function which pops up a window with all the information entered into the form. Because of this I have to take the values from the form to a Javascript function. For the other form elements that aren't in arrays I have managed this already but I am stuck at the array... These are snippets of the code I am using:
Bracelets:
Silver:<input type="checkbox" name="brace[]" id="brace[]" value="1">
Gold:<input type="checkbox" name="brace[]" id="brace[]" value="10">
<button id="preview_but" onClick="preview(uploadfile1.value,uploadfile2.value,what.value,description.value,brace.value)">Preview</button>
<!-- brace is the array -->
Any ideas on how to get the checkboxes to be passed to the preview function as an array and then extracted within the function?
Any help is most gratefully recieved as I am only really starting out in Javascript...
Dan
I have a form which contains within it a group of checkboxes, which for other purposes, the values form part of an array. The function for which this was originally intended works fine but unfortunately I have a preview function which pops up a window with all the information entered into the form. Because of this I have to take the values from the form to a Javascript function. For the other form elements that aren't in arrays I have managed this already but I am stuck at the array... These are snippets of the code I am using:
Bracelets:
Silver:<input type="checkbox" name="brace[]" id="brace[]" value="1">
Gold:<input type="checkbox" name="brace[]" id="brace[]" value="10">
<button id="preview_but" onClick="preview(uploadfile1.value,uploadfile2.value,what.value,description.value,brace.value)">Preview</button>
<!-- brace is the array -->
Any ideas on how to get the checkboxes to be passed to the preview function as an array and then extracted within the function?
Any help is most gratefully recieved as I am only really starting out in Javascript...
Dan