Studio Zero
« Add Button to Menu »

Welcome Guest. Please Login or Register.
Sept 3, 2010, 4:31am





Studio Zero :: Web Development :: Code Storage :: Add Button to Menu
   [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: Add Button to Menu (Read 1,375 times)
Rouno
Dedicated Member
***
[p:121]
member is offline





Joined: Aug 2005
Gender: Male
Posts: 138
Karma: 2
 Add Button to Menu
« Thread Started on Aug 22, 2005, 7:38pm »

Title of Script: Add Button to Menu
Script Version: N/A
Script Creator: Eichi
Description: Adds a button to the menu bar. Can have image or text.
Compatibility: Works in Internet Explorer and Mozilla Firefox
Preview: N/A

Location: GLOBAL HEADER



<script type="text/javascript">
<!--
/*
Add Button to Menu Bar
Created by Eichi
http://theozymandius.proboards22.com/index.cgi
*/

// If you have an image, put in the full image tag here. Else, just put the link title
var mButton = '<img src="URL OF IMAGE" border="0">';

// Put the URL of the link
var mURL = "URL OF BUTTON";

// No editing required
var menuBar = document.getElementsByTagName('td')[5];
if(menuBar.className == "menubg"){
   menuBar.innerHTML += '<a href="'+mURL+'">'+mButton+'</a>';
}
//-->
</script>


Editing: Edit the two variables in the beginning of the code. If you don't want an image, replace the image tag with just text.
Link to Post - Back to Top  IP: Logged

[image]
   [Search This Thread][Send Topic To Friend] [Print]


Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Report Abuse | Mobile