Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

crazynarutard

crazynarutard Avatar

*****
Senior Studio Member

1,470


August 2005
Description: This will add one or more buttons to the menu bar.
Code placement: Global headers



<script type='text/javascript'>
/*Add Menu Buttons
Do not redistribute without the creator's permission
CRAzY_J ~ http://ssdesigns.proboards17.com*/

function addo(link,ilink){
var Img=document.createElement('img');
var Href=document.createElement('a');
Href.href=link;
if(ilink.match(/^(http|www)/i)){
Img.src=ilink;
Img.border='0';
Href.appendChild(Img);
}else{
Href.innerHTML=ilink;
}
document.body.getElementsByTagName("td")[5].firstChild.appendChild(Href);
}

addo('LINK','IMAGE LINK');
addo('LINK','IMAGE LINK');
</script>





Code instructions: The red part is where you will need to put the url to which you want the user to be redirected when clicking the button. The blue part is the url to the image of the button. (make sure the image url starts with "http" or "www")
If you want to add more buttons just keep using the same line:addo('LINK','IMAGE LINK');

Text menus: If you want to add text buttons, you just put the message you want the users to click in the blue area, so instead of the image url you put your message (may not start with "http" or "www")
If you do not understand the instructions, then ask for help in code support


Last Edit: Jun 30, 2006 21:12:28 GMT by Chris

newBookmarkLockedFalling