F
FP
This should be simple but I just can't seem to figure it out.
I have a form with 2 checkboxes in it. Clicking either checkbox runs a
js function which opens a new window. The form targets that new
window.
How can I pass a hidden value letting the new window know which
checkbox was clicked?
Below is the code I'm currently using:
function JSCheckbox(WhichForm) {
window.open('', "CheckboxWindow", 'height=1,width=1');
document.getElementById(WhichForm).submit();
}
<form id="FormCheckbox1" method="post" action="checkbox.php"
target="CheckboxWindow">
<input type="hidden" name="TheRecID" value="1">
<input type=checkbox NAME="FlagDone" VALUE="1"
onclick="JSCheckbox('FormCheckbox1');">
.... second checkbox
</form>
I have a form with 2 checkboxes in it. Clicking either checkbox runs a
js function which opens a new window. The form targets that new
window.
How can I pass a hidden value letting the new window know which
checkbox was clicked?
Below is the code I'm currently using:
function JSCheckbox(WhichForm) {
window.open('', "CheckboxWindow", 'height=1,width=1');
document.getElementById(WhichForm).submit();
}
<form id="FormCheckbox1" method="post" action="checkbox.php"
target="CheckboxWindow">
<input type="hidden" name="TheRecID" value="1">
<input type=checkbox NAME="FlagDone" VALUE="1"
onclick="JSCheckbox('FormCheckbox1');">
.... second checkbox
</form>