Computing.Net > Forums > Web Development > Merge 2 java scripts

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Merge 2 java scripts

Reply to Message Icon

Name: wiredsj
Date: June 14, 2004 at 22:38:50 Pacific
OS: WinXp Pro SP1
CPU/Ram: 1.8 ghz / 512k
Comment:

Hi,

I have one java script that perform an image swap on mouseover. I haver another java script that will swap another image besides itself when you mouseover. I've tried combining them but with no success.

What i'm after is for the button you're about to click to swap (pretty standard) but i also want a second image to load somewhere else on the page that gives a brief description (with graphics) pertaining to the page you're about to be directed to. I have the main part working but can't get teh image i'm clicking to swap at the same time the the decription is loading. Any help would be appreciated.


thanks in advance,
wired



Sponsored Link
Ads by Google

Response Number 1
Name: SN
Date: June 15, 2004 at 20:05:24 Pacific
Reply:

If I understand you correctly, you probably have two functions...One to swap the image you're hovering over, the other to swap some other image somewhere on the page. This isn't difficult...But you need to combine them into one function (just copy and paste, it doesn't matter which order you do it in), and set the new, longer function as the onMouseOver event handler.

Of course, copying and pasting might cause some problems if the functions share variable names, etc. If you can post a link the code, we can be more specific.

-SN


0
Reply to Message Icon

Related Posts

See More


Entering text via hyperli... Web design program



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Merge 2 java scripts

Make java script Firefox compatible www.computing.net/answers/webdevel/make-java-script-firefox-compatible/3665.html

Java Script Problem www.computing.net/answers/webdevel/java-script-problem/2090.html

Calling java script functions www.computing.net/answers/webdevel/calling-java-script-functions/1166.html