Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-28-2004, 08:04 PM   PM User | #1
johnxp
New to the CF scene

 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
johnxp is an unknown quantity at this point
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
johnxp is offline   Reply With Quote
Old 04-28-2004, 08:13 PM   PM User | #2
fredmv
Regular Coder

 
Join Date: Jul 2003
Location: Massachusetts
Posts: 472
Thanks: 0
Thanked 0 Times in 0 Posts
fredmv is an unknown quantity at this point
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.
fredmv is offline   Reply With Quote
Old 04-30-2004, 04:05 PM   PM User | #3
jtaylor
New Coder

 
Join Date: Apr 2004
Location: The Ghetto (Winchendon, MA)
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
jtaylor is an unknown quantity at this point
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
jtaylor is offline   Reply With Quote
Old 04-30-2004, 06:38 PM   PM User | #4
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,033
Thanks: 197
Thanked 2,410 Times in 2,388 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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
Philip M is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:36 PM.


Advertisement
Log in to turn off these ads.