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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    two or more scripts to work concurrently on one page

    I'm having trouble getting two or more scripts to work concurrently on one page. By themselves, each function just fine, but when put together, they throw a tantrum. Help!

    I tried to write the two onload sections as one but that still did not work.

    Help

  • #2
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Welcome to CF.

    It's most likely variables/functions conflicting if not two event handler attributes as you already mentioned. The code you're working with or even better a link to the page in question would be helpful.

  • #3
    New Coder
    Join Date
    Apr 2004
    Location
    The Ghetto (Winchendon, MA)
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Agreement and help

    I agree with fredmv, some examples of your code would be helpful.

    I know you said you already tried writing them as one line but try this again and see how it works.

    (this is if you're using them in the BODY tag)

    <BODY onload="function1();function2();">

    That should work!

    JT

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,146
    Thanks
    203
    Thanked 2,547 Times in 2,525 Posts
    This question is frequently asked, and there is a most lucid explanation and tutorial to be found at

    http://www.javascriptkit.com/javatut...iplejava.shtml


  •  

    Posting Permissions

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