View Single Post
  #1  
Old 02-11-2007, 10:18 AM
Bratz-Designs Bratz-Designs is offline
 
Join Date: Jul 2005
Location: Netherlands
Posts: 236
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default rollover buttons

Hey all,

I have been trying to code some rollover buttons on my forum but something seems to go wrong, can you help me figure out what exactly?

In headeInclude:
Code:
<script type="text/javascript"> 
<!-- 

if (document.images) 
    { 
	image1on = new Image(); 
	image1on.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/home.gif"; 
	image1off = new Image(); 
	image1off.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/home_over.gif";  
	image2on = new Image(); 
	image2on.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/forum.gif"; 
	image2off = new Image(); 
	image2off.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/forum_over.gif"; 
	image3on = new Image(); 
	image3on.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/usercp.gif"; 
	image3off = new Image(); 
	image3off.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/usercp_over.gif"; 
	image4on = new Image(); 
	image4on.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/arcade.gif"; 
	image4off = new Image(); 
	image4off.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/arcade_over.gif"; 
	image5on = new Image(); 
	image5on.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/chat.gif"; 
	image5off = new Image(); 
	image5off.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/chat_over.gif"; 
	image6on = new Image(); 
	image6on.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/members.gif"; 
	image6off = new Image(); 
	image6off.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/members_over.gif";
	image7on = new Image(); 
	image7on.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/faq.gif"; 
	image7off = new Image(); 
	image7off.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/faq_over.gif";
	image8on = new Image(); 
	image8on.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/affiliates.gif"; 
	image8off = new Image(); 
	image8off.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/affiliates_over.gif";
	image9on = new Image(); 
	image9on.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/topsites.gif"; 
	image9off = new Image(); 
	image9off.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/topsites_over.gif";  
	image10on = new Image(); 
	image10on.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/logout.gif"; 
	image10off = new Image(); 
	image10off.src = "http://www.bratz-designs.com/forums/images/afterdark/misc/logout_over.gif";
    }  

function changeImages() 
    { 
	if (document.images) 
	    { 
for (var i=0; i<changeImages.arguments.length; i+=2) 
    { 
	document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src"); 
    } 
	    } 
    } 

// --> 
</script>
In header template:
Code:
   <td width="100%" height="33" align="left" valign="top" style="background-image:url($stylevar[imgdir_misc]/xnav.gif)"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
        <tr>
<td align="left" valign="top" width="79" height="33"><a href="http://www.bratz-designs.com" onmouseover="changeImages('image1', 'image1off')" onmouseout="changeImages('image1', 'image1on')><img src="http://www.bratz-designs.com/forums/images/afterdark/misc/home.gif" width="79" height="33" name="image1"  border="0" alt="Home" 'image1on'/></a></td>
<td align="left" valign="top" width="79" height="33"><a href="http://www.bratz-designs.com/forums/index.php" onmouseover="changeImages('image2', 'image2off')" onmouseout="changeImages('image2', 'image2on')><img src="http://www.bratz-designs.com/forums/images/afterdark/misc/forum.gif" width="79" height="33" name="image2"  border="0" alt="Forum" 'image2on'/></a></td>
<td align="left" valign="top" width="79" height="33"><a href="http://www.bratz-designs.com/forums/usercp.php$session[sessionurl_q]" onmouseover="changeImages('image3', 'image3off')" onmouseout="changeImages('image3', 'image3on')><img src="http://www.bratz-designs.com/forums/images/afterdark/misc/usercp.gif" width="79" height="33" name="image3" border="0" alt="UserCp" 'image3on'/></a></td>
<td align="left" valign="top" width="79" height="33"><a href="http://www.bratz-designs.com/forums/arcade.php$session[sessionurl_q]" onmouseover="changeImages('image4', 'image4off')" onmouseout="changeImages('image4', 'image4on')><img src="http://www.bratz-designs.com/forums/images/afterdark/misc/arcade.gif" width="79" height="33" name="image4" border="0" alt="Arcade" 'image4on'/></a></td>
<td align="left" valign="top" width="79" height="33"><a href="http://www.bratz-designs.com/forums/javachat.php$session[sessionurl_q]" onmouseover="changeImages('image5', 'image5off')" onmouseout="changeImages('image5', 'image5on')><img src="http://www.bratz-designs.com/forums/images/afterdark/misc/chat.gif" width="79" height="33" name="image5" border="0" alt="Chat" 'image5on'/></a></td>
<td align="left" valign="top" width="79" height="33"><a href="http://www.bratz-designs.com/forums/memberlist.php$session[sessionurl_q]" onmouseover="changeImages('image6', 'image6off')" onmouseout="changeImages('image6', 'image6on')><img src="http://www.bratz-designs.com/forums/images/afterdark/misc/members.gif" width="79" height="33" name="image6" border="0" alt="Members" 'image6on'/></a></td>
<td align="left" valign="top" width="79" height="33"><a href="http://www.bratz-designs.com/forums/affiliates.php$session[sessionurl_q]" onmouseover="changeImages('image8', 'image8off')" onmouseout="changeImages('image8', 'image8on')><img src="http://www.bratz-designs.com/forums/images/afterdark/misc/affiliates.gif" width="79" height="33" name="image8" border="0" alt="Affiliates" 'image8on'/></a></td>
<td align="left" valign="top" width="79" height="33"><a href="http://www.bratz-designs.com/forums/toplist.php$session[sessionurl_q]" onmouseover="changeImages('image9', 'image9off')" onmouseout="changeImages('image9', 'image9on')><img src="http://www.bratz-designs.com/forums/images/afterdark/misc/topsites.gif" width="79" height="33" name="image9" border="0" alt="Toplist" 'image9on'/></a></td>
<td align="left" valign="top" width="79" height="33"><a href="http://www.bratz-designs.com/forums/faq.php$session[sessionurl_q]" onmouseover="changeImages('image7', 'image7off')" onmouseout="changeImages('image7', 'image7on')><img src="http://www.bratz-designs.com/forums/images/afterdark/misc/faq.gif width="79" height="33" name="image7" border="0" alt="" 'image7on'"/></a></td>
<if condition="$show['member']">
<td align="left" valign="top" width="79" height="33"><a href="http://www.bratz-designs.com/forums/login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out() onmouseover="changeImages('image10', 'image10off')" onmouseout="changeImages('image10', 'image10on')"><img src="http://www.bratz-designs.com/forums/images/afterdark/misc/logout.gif" width="79" height="33" name="image10" border="0" alt="" 'image10on'/></a></td>
		</if>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01263 seconds
  • Memory Usage 1,812KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete