MyBB Community Forums

Full Version: onMouseOver & MM_swapImage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
need to make menu buttons on my forum like my website
but I keep comming up with an error or it sometimes works and other times will not

I have tried this and a few veriations of it
<li><a href="../" onMouseOver="MM_swapImage('home','','{$theme['imgdir']}/toplinks/home4on.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="{$theme['imgdir']}/toplinks/home4off.jpg" style="vertical-align: middle" name="home" alt="Main Web Site" border="0"></a></li>
What am I missing?

The forum is located at UAW1183.com/forum
Moved to Templates.

I'm not seeing any javascipt, where is the MM_swapImage/MM_swapImgRestore?
So very sorry Rolleyes my bad
in my hurry to get this to work before I had to go to work this morning,
I got the home button to work and then copied & paste & changed the image names, but forgot to change the button names
so it was not enough coffee @ 2am
Now that I am home and more awake @ 3:23pm I see my mistake right off

Here is the code that works:

UAW 1183 Forums Control Panel ยป Template Manager
Edit Template Header
<script src="rollover.js" type="text/javascript"></script>
	<a name="top" id="top"></a>
	<div id="container">
<div class="top_head" height="22">
	<span style="float:right;"><b>{$lang->welcome_current_time}</b></span>
<b>Welcome to UAW1183.com/forums</b>

</div>
		<div id="header">
			<div class="logo" height="147"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" /></a></div>
			<div class="menu">
				<ul>
					
<li><a href="../" onMouseOver="MM_swapImage('home','','{$theme['imgdir']}/toplinks/home4on.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="{$theme['imgdir']}/toplinks/home4off.jpg" style="vertical-align: middle" name="home" alt="Main Web Site" border="0"></a></li>

					<li><a href="{$mybb->settings['bburl']}/search.php" onMouseOver="MM_swapImage('search','','{$theme['imgdir']}/toplinks/searchon.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="{$theme['imgdir']}/toplinks/searchoff.jpg" style="vertical-align: middle" name="search" alt="" border="0"></a></li>

					<li><a href="{$mybb->settings['bburl']}/memberlist.php" onMouseOver="MM_swapImage('members','','{$theme['imgdir']}/toplinks/memberson.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="{$theme['imgdir']}/toplinks/membersoff.jpg" style="vertical-align: middle" name="members" alt="" border="0"></a></li>

					<li><a href="{$mybb->settings['bburl']}/calendar.php" onMouseOver="MM_swapImage('calendar','','{$theme['imgdir']}/toplinks/calendaron.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="{$theme['imgdir']}/toplinks/calendaroff.jpg" style="vertical-align: middle" name="calendar" alt="" border="0"></a></li>

					<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" onMouseOver="MM_swapImage('help','','{$theme['imgdir']}/toplinks/helpon.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="{$theme['imgdir']}/toplinks/helpoff.jpg" style="vertical-align: middle" name="help" alt="" border="0"></a></li>
				</ul>
			</div>
			<hr class="hidden" />
			<div id="panel">
				{$welcomeblock}
			</div>
		</div>
		<hr class="hidden" />
		<br class="clear" />
		<div id="content">
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			<navigation>
			<br class="clear" />
Now I need to just edit the size of my buttons to get a better fit

Sorry to bother everyone