Forums

This topic is locked

switching values of hidden variables

Posted 23 Mar 2002 11:12:37
1
has voted
23 Mar 2002 11:12:37 jon badda posted:
Heya, Im wanting to switch the value of a hidden form element from nothing to the same value as a checkbox when the box is checked by the user.

Make sense? Ever heard of this being done??

Replies

Replied 23 Mar 2002 13:44:42
23 Mar 2002 13:44:42 Owen Eastwick replied:
Something like:

<Script Language="JavaScript">
<!--

function CopyField(){
document.FormName.HiddenFieldName.value = document.FormName.CheckBoxName.value
}

//-->
</Script>

Then mofdify the checkbox tag:

<input type="checkbox" name="CheckBoxName" onClick="CopyField()">

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo

Edited by - oeastwick on 23 Mar 2002 13:50:25

Reply to this topic