I have a checkbox array that I need to pass to a function, but I'm having problems. My html for the array is as follows:
When the user clicks 'Go' I need to pass the array to a function. I'm using modal windows and this is the only way I can get data out. My onclick code is as follows:
and my sendAndClose function is as follows:
The problem is I keep getting an error
So somewhere I'm loosing my array, or maybe I didn't have it in the first place. Can anyone please tell me what I'm doing wrong?
Thanks
Code:
<input name="chkRpt[]" type="checkbox" id="rptTue" value="2" />
<input name="chkRpt[]" type="checkbox" id="rptWed" value="3" />
<input name="chkRpt[]" type="checkbox" id="rptWed" value="3" />
etc...
Code:
onclick="sendAndClose(this.form.chkRpt)"
Code:
function sendAndCloseRepeat(var1)
{
window.dialogArguments.var1 = var1;
window.returnValue=true;
window.close();
}
Code:
Error: 'test.var1.0' is null or not an object
Thanks