/    Sign up×
Community /Pin to ProfileBookmark

Combining 2JavaScripts with 2Mouseon Events

Hi,

I’m trying to “combine” two JavaScripts, each with it’s own Mouseover/Mouseout events…

[/b]The first one basically slides out a menu and has this for MouseEvents:[/b]

[COLOR=blue]_______________
<td class=”txt” onmouseover=”changeBG(this,’#ff0000′)” onmouseout=”changeBG(this,’#0099CC’)”><a href=”#”>home</a></td>
_
__
_______________[/color]

[b]The other one, has this to produce sounds on Mousevents:[/b]

[COLOR=red]______________
<a href=”#” onmouseover=”playSound(0)” onmouseout=”stopSound(1)” onclick=”playSound(1)”>1MOUSE-OVER THIS LINK TO PLAY SOUND</A>
_
__
__________________[/color]

How can I combine the 2 to make them work both at the same time, wherein as soon as I slide out a menu and mouseover links (both outside and inside) it’ll produce the same results? [b][i]You may want to look at the attached TXT file for the entire script…(btw, the SoundOnMouseOver part doesn’t work at all)[/i][/b]

[upl-file uuid=9cd4aa62-da84-4372-a09b-cb0f9451fe64 size=5kB]slidemenuwithsound.txt[/upl-file]

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@Four_of_FiveauthorSep 29.2003 — Btw, I have made the following "failed" combinations:


_____________________________

<body onload="slideMenuInit()">

<table id="menu" width="180" border="1" cellpadding="3" cellspacing="0" bgcolor="#0099CC" bordercolor="#FFFF00" onmouseover="slideIn()" onmouseout="slideOut()">

<tr>

[color=red]<td class="txt" onmouseover="changeBG(this,'#ff0000');playSound(0)" onmouseout="changeBG(this,'#0099CC');playSound(1)" onclick="playSound(2)">[/color]<a href="#">home</a></td>

<td rowspan=6 class="txt">M<br/>E<br/>N<br/>U</td>

</tr>

[color=royal blue]<tr>

<td class="txt" onmouseover="changeBG(this,'#ff0000')" onmouseout="changeBG(this,'#0099CC')"><a href="#" onmouseover="playSound(2)" onmouseout="stopSound(3)" onclick="playSound(3)">dhtml scripts</a></td>

</tr>[/color]

_________________________________

Neither of which worked ?
Copy linkTweet thisAlerts:
@Four_of_FiveauthorOct 04.2003 — [SIZE=4][B]BUMP UP[/B][/SIZE] :rolleyes:

maybe some1 has answers already?

Thanks!
Copy linkTweet thisAlerts:
@Four_of_FiveauthorOct 05.2003 — Although it didn't actually solve my problem outright...your link certainly reminded me where to look ? Thanks!

I simply tried adding another <body onload> function to the other javascript onload functions I already had on the page...(though it wasn't really part of the original scripting)
×

Success!

Help @Four_of_Five spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...