View Single Post
Old 17-06-2004, 11:59   #8 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,968
Quote:
Originally Posted by adras
function populateTextBoxes() {
document.form1.mytextbox.value = document.form1.combobox.value;
}

and call this inside the checkbox input tag - with an onchange event.

You might wanna add checker so that the function is only triggered when the checkbox is actually checked.
e.g.
Code:
function populateTextBoxes() { if (document.forms.form1.checkbox.checked == true) { document.form1.mytextbox.value = document.form1.combobox.value; } }

It's also an idea to add in some else code that clears the second set of input fields if the checkbox is then unchecked.
  Reply With Quote