|
Post by SonicX on May 19, 2005 10:49:22 GMT -8
In the Main or Global Header
Text Version
<script> //Created by SonicX | Add a Link to Menu Bar Text Version var menubar=document.getElementsByTagName("TD")[5] menubar.innerHTML+='<a href="URL HERE"><font size="1">WHAT EVER YOU WANT</size></font></a>'; </script>
Image Version
<script> //Created by SonicX | Add a Link to Menu Bar Image Version var menubar=document.getElementsByTagName("TD")[5] menubar.innerHTML+='<a href="URL HERE"><img src="IMAGE HERE"></a>'; </script>
Enjoy
Last Edit: Jun 16, 2005 16:18:29 GMT -8 by SonicX
|
|
|
Post by Ten Kabuto on May 19, 2005 11:30:02 GMT -8
What does this actually.. do? Does it JUST add a link to the menubar?
|
|
|
Post by SonicX on May 19, 2005 11:36:11 GMT -8
I fixed it. It adds a link to the menubar. You can have it in Text, or an Image button.
|
|
|
Post by Ten Kabuto on May 19, 2005 11:38:13 GMT -8
umm.. thanx?
|
|
|
Post by CD on May 19, 2005 13:13:50 GMT -8
That's pretty good for your first code. Try it like this though:
<script> //Created by SonicX | Add a Page (Text Version) [PBV4] // URL to Image var IMG = "http://yourhost.com/image.ext"; // URL to page var URL = "http://yourwebsite.com/page.html";
document.getElementsByTagName("TD")[6].innerHTML+="<a href='"+URL+"'><img src='"+IMG+"'></a>"; </script>
and
<script> //Created by SonicX | Add a Page (Text Version) [PBV4] // Text to be displayed var text = "[ Page ]"; // URL to page var URL = "http://yourwebsite.com/page.html";
document.getElementsByTagName("TD")[6].innerHTML+="<a href='"+URL+"'><font='1'>"+text+"</font></a>"; </script>
|
|
|
Post by CrAzY_J on May 19, 2005 14:07:09 GMT -8
<script language='javascript'> //include image? var id='yes'; var irl='url image';
var url='link' var text='text'; //No edit below var img=document.createElement('img'); var href=document.createElement('a'); href.href=url; if(id.toLowerCase()=='yes'){ img.setAttribute('src','irl'); href.innerHTML=img; document.getElementsByTagName('td')[5].appendChild(href) }else{ href.innerHTML=text; document.getElementsByTagName('td')[5].appendChild(href) } </script>
|
|
|
Post by SonicX on May 19, 2005 15:56:12 GMT -8
Good idea!
|
|
100%
|
Post by Aaron on May 21, 2005 6:15:50 GMT -8
SonicX, your code won't add image/text to the menu bar. You made the code add image/text to the seventh td on the page. The menu bar is the sixth.
|
|
|
Post by SonicX on May 21, 2005 20:50:06 GMT -8
Okie Dokie I will fix it. (Done!!)
Last Edit: Jun 16, 2005 16:19:54 GMT -8 by SonicX
|
|