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


Quick Links:


newBookmarkLockedFalling

crazynarutard

crazynarutard Avatar

*****
Senior Studio Member

1,470


August 2005
Code Description: Unlike the "add menu buttons" code which ads the menu button on the right side of the menu bar, this code ads the menu button on the left side of the menu bar.
Code creator: CrAzY_J
Code Placement: All headers

Code Instructions: To add a button all you need to do is add this line to the script.

InsertLinks("Image url","Button Url")

The red part is the URL of the button, so replace the red text with the URL of the button which you would wish to add.
The blue part is the url where the browser shall take the user when they click the button, replace the blue with the url to which the user will be redirected. (Leave blank if you don't want them to be redirected at all)



<script type="text/javascript">
/*
Insert Menu Buttons
Created by CrAzY_J ( hatakeforum.proboards30.com )
Do not modify or redstribute this code without the creator's permission
*/

function InsertLinks(ImageUrl,ClickUrl)
{
var gCell = document.body.getElementsByTagName( "td" )[5];
var Anchor = document.createElement( "a" );
var Img = document.createElement( "img" );
Anchor.href = ClickUrl
Img.src = ImageUrl;Img.border = 0;
Anchor.appendChild(Img)
var Shorter = gCell.firstChild;
var Shorter2 = Shorter.getElementsByTagName( "a" )
Shorter.insertBefore(Anchor,Shorter2[0]);
Shorter.insertBefore(document.createTextNode(' '),Shorter2[1]);
}

InsertLinks("Image url","Button Url")

</script>




Last Edit: Jun 30, 2006 21:11:21 GMT by Chris

newBookmarkLockedFalling