1
Cavan
onmouseover problem in my theme.html
  • 2005/1/10 4:54

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


The main menu on my site exists at the top of all my pages (buttons with text links, nothing fancy, just clean and simple) but I would like to have a mouseover effect when users click on the buttons...However, I can't get this to work in the theme.html (I use the "phpbbstyle" theme).

An example of what I have (that doesn't work):

<a href="#" onMouseOut="MM_swapImgRestore();"
onMouseOver="MM_swapImage('home','',
'<
{$xoops_imageurl}>home2.gif',1);">
<
img name="home" src="<{$xoops_imageurl>home.gif
width="
12" height="13" border="0" alt="">


Seems simple enough to do but I can't figure out what I'm doing wrong here.
Can someone please help me with this?

2
talunceford
Re: onmouseover problem in my theme.html

What you might do is build the effect in a fresh html doc to make sure that it works the way that you want, then copy the code into your theme.html file. Give that a shot, it might be just as simple as you aren't including enough of the javascript.

Best of luck,

3
Cavan
FIXED: onmouseover problem in theme.html
  • 2005/1/10 14:40

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


Tim,

Thank you, you're helpful as always...Here's what works:

<a href"http://www.xxxxxxxxxxxxx.com/xxxxxx.php"
onMouseOver"if (document.images
document.home.src= 'http://www.xxxxxxxxxxxxx.com/themes/phpbbstyle/images/home2.gif';"
onMouseOut"if (document.images)document.home.src= 'http://www.xxxxxxxxxxxxx.com/themes/phpbbstyle/images/home.gif';">
<
img src"http://www.xxxxxxxxxxxxx.com/themes/phpbbstyle/images/home.gif" 
width=12 height=13 alt="Home" name="home" border=0>&nbsp;
<
b>Homeb>a>


Thanks again for pointing me in the right direction.

4
Cavan
ALMOST FIXED (onmouseover problem in theme.html)
  • 2005/1/12 16:04

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


The mouseover image change worked fine until I added SOUND...Now the sound plays, but the image doesn't change:

<a href"http://www.xxxxxxxxxxxxx.com" onMouseOver="playSound(0)" 
onMouseOut="stopSound(0)" onMouseOver"if (document.images) 
document.home1.src= 'http://www.xxxxxxxxxxxxx.com/themes/phpbbstyle/images/home2.gif';" 
onMouseOut"if (document.images) document.home1.src= 'http://www.xxxxxxxxxxxxx.com/themes/phpbbstyle/images/home1.gif';">
<
img src"http://www.xxxxxxxxxxxxx.com/themes/phpbbstyle/images/home1.gif" 
width=46 height=15 alt="" name="home1" border=0>a>


Am I missing a semi-colon here somewhere, or what am I missing?

In addition, though the script includes using Netscape, the sound doesn't play in Firefox...Does anyone using Firefox know if there are specific parameters that I need to add to get the sound to play when viewing the site in Firefox?

document.write('')
IE = (navigator.appVersion.indexOf("MSIE")!=-&& document.all)? 1:0;
NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
ver4 IE||NS1:0;
onload=auPreload;
(not the entire script obviously)

I need to get these last two issues fixed ASAP...this is the last "tweak" to our site before we go "live".

Can someone please help me fix these issues? Thank you.

Login

Who's Online

402 user(s) are online (285 user(s) are browsing Support Forums)


Members: 0


Guests: 402


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits