hello,
I've got a form which when a user click on checkbox it copies the contents of a textbox into another textbox. ie, billing and delivery address . I now want to use buttons instead of tickboxs but having trouble getting it to work. Ta
<!-- Begin
var mtoprice3 = "";
var otherprice3 = "";
function InitSaveVariables(form) {
mtoprice3 = form.mtoprice3.value;
otherprice3 = form.otherprice3.value;
}
function madetomeasure(form) {
if (form.copy.checked) {
InitSaveVariables(form);
form.mtoprice3.value = form.mtoprice.value;
form.otherprice3.value = form.otherprice.value;
}
else {
form.mtoprice3.value = mtoprice3;
form.otherprice3.value = otherprice3;
}
}
// End -->
--------------------------
<INPUT type="checkbox" name="copy"
onClick="javascript:madetomeasure(this.form);" value=http://www.webdeveloper.com/forum/archive/index.php/"checkbox">
Thanks
Alan
The form is called'form' the top boxes are mtoprice and otherprice. The bottom boxes are mtoprice3 and otherprice3
I've got a form which when a user click on checkbox it copies the contents of a textbox into another textbox. ie, billing and delivery address . I now want to use buttons instead of tickboxs but having trouble getting it to work. Ta
<!-- Begin
var mtoprice3 = "";
var otherprice3 = "";
function InitSaveVariables(form) {
mtoprice3 = form.mtoprice3.value;
otherprice3 = form.otherprice3.value;
}
function madetomeasure(form) {
if (form.copy.checked) {
InitSaveVariables(form);
form.mtoprice3.value = form.mtoprice.value;
form.otherprice3.value = form.otherprice.value;
}
else {
form.mtoprice3.value = mtoprice3;
form.otherprice3.value = otherprice3;
}
}
// End -->
--------------------------
<INPUT type="checkbox" name="copy"
onClick="javascript:madetomeasure(this.form);" value=http://www.webdeveloper.com/forum/archive/index.php/"checkbox">
Thanks
Alan
The form is called'form' the top boxes are mtoprice and otherprice. The bottom boxes are mtoprice3 and otherprice3