Use
for (var i=1;i<4;i++) {
.........
.........
if (eval("if(oform.Ret_Attempt"+i+".checked)"))
-----Original Message-----
From: LeGrand Decius [mailto:legrandnews@;sovratec.com]
Sent: 07 November 2002 15:15
To: ActiveServerPages
Subject: Checkbox Object Array
I have three check boxes on a page. How can I get the following to work
without writing 3 different functions.
<input type="checkbox" name="Ret_Attempt1" value="1" onClick="TimeStamp(1)">
<input type="checkbox" name="Ret_Attempt2" value="1" onClick="TimeStamp(2)">
<input type="checkbox" name="Ret_Attempt3" value="1" onClick="TimeStamp(3)">
function TimeStamp(t){
var today = new Date();
var oform = document.frmret;
if(oform.Ret_Attempt1.checked)
oform.Ret_Att_Time1.value = today;
else oform.Ret_Att_Time1.value = "";
}
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]