Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2003
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Syntax error on onClick (separator between functions?)

    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">

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    i think this is what you are asking

    PHP Code:
    onclick="function1;function2;function3" 

    so

    PHP Code:
    <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

  • #3
    New Coder
    Join Date
    Aug 2003
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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); }
    }

  • #4
    New Coder
    Join Date
    Aug 2003
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    that was it !

    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

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Last edited by adios; 10-27-2003 at 04:43 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •