...

View Full Version : Syntax error on onClick (separator between functions?)



pa2stepper
10-27-2003, 04:15 PM
I'm doing a call to a function, then just plain script afterward. The call works, the script concat stuff doesn't get picked up. Is there a different separator that I should be using? Thank you, Mary

<INPUT NAME="SubmitEditProduct" TYPE="SUBMIT" onClick="MM_callJS('setImageSource document.editForm.userDefinedFive)')";
"this.form.name.value=(this.form.city.value+this.form.comma.value+this.form.state[this.form.state.selectedIndex].value)"; VALUE="Submit Edit">

A1ien51
10-27-2003, 04:18 PM
i think this is what you are asking



onclick="function1;function2;function3"



so



<INPUT NAME="SubmitEditProduct" TYPE="SUBMIT" onClick="MM_callJS('setImageSource document.editForm.userDefinedFive)');
this.form.name.value=(this.form.city.value+this.form.comma.value+this.form.state[this.form.state.selectedIndex].value)" VALUE="Submit Edit">


I think I formatted it right at a quick glance
Eric

pa2stepper
10-27-2003, 04:19 PM
Forgot to include the function - sorry:

function setImageSource(field)
{
if ((field.value.length==0) ||
(field.value==null)) { return true;
}
else { field.value = ("%%IMG%%"+field.value); }
}

pa2stepper
10-27-2003, 04:24 PM
thank you - it was my quotes - i had them around each different "function", but now I see that they go around the entire call even if it contains more than 1.
got it!
best,
mary

adios
10-27-2003, 04:26 PM



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum