|
Post by Simpsons Rule on Dec 12, 2003 23:15:22 GMT -5
To add a new button to the menu at the top of the page, use this code. If you want the button to be on the left: <script type='text/javascript'>
var ImgUrl='URL OF IMAGE'; var UrlDir='http://URL OF SITE';
var gCell=document.body.getElementsByTagName('td').item(5); var Img=document.createElement('img'); var Href=document.createElement('a'); Href.setAttribute('href',UrlDir); Img.setAttribute('src',ImgUrl); Img.setAttribute('border','0') Href.appendChild(Img); gCell.appendChild(Href); </script>If you want the button to be on the right use this code: support.proboards.com/index.cgi?board=codedatabase&action=display&n=1&thread=1127952961Now if you don't have an image and you just want linking text, use this: <script type='text/javascript'>
var iText='text'; var UrlDir='http://URL OF WEBSITE';
var gCell=document.body.getElementsByTagName('td').item(5); var Href=document.createElement('a'); Href.setAttribute('href',UrlDir); Href.innerHTML=iText gCell.appendChild(Href); </script>Place this in all of your Global Headers and edit the red parts.
|
|
Help
New Member
Posts: 5
|
Post by Help on Feb 22, 2004 12:38:42 GMT -5
This doesn't work!
Why well change the "Quotes" 'This'
|
|
|
Post by Simpsons Rule on Feb 22, 2004 17:18:32 GMT -5
This doesn't work! Why well change the "Quotes" 'This' I've tested them out before, they work fine. Please post a link to your forum and leave the codes in.
|
|
JayPetey
Junior Member
So...Whats next?
Posts: 13
|
Post by JayPetey on Feb 26, 2004 23:07:51 GMT -5
I used the front code, but then I changed it to back and it didnt work, but when I changed the " to ' thats around the link and image it worked
So change the innerHTML+="<a href="URL of Link"><img src="URL OF BUTTON IMAGE" border='0'></a>"
-to-
innerHTML='<a href="URL OF LINK"><img src="URL OF BUTTON IMAGE" border="0"></a> '
On the second one
|
|
Help
New Member
Posts: 5
|
Post by Help on Feb 29, 2004 15:56:00 GMT -5
C what did i tell u simpson i got a guy that has the same problem!
|
|
|
Post by JZSquared on Mar 1, 2004 16:28:23 GMT -5
Hey, why don't you guys back off ! Simpsons Rule, is only trying to help you... I'm sure he would have been able to do that if you guys would have cooperated with him, instead of putting him, and his work down... Remember, he's doing this work for free, out of the kindness of his heart, so I think that he deserves a little more respect from the likes of you...
|
|
JayPetey
Junior Member
So...Whats next?
Posts: 13
|
Post by JayPetey on Mar 4, 2004 23:33:51 GMT -5
Excuse me? Us? We are reporting a broken code. Thank us.
Simpson has been more than helpfull with this site, and I am greatlly thankfull for it.
Re-read what I said and what Help said. And find that we were only trying to help. I tested the code and it didnt work so I am only trying to help by making invailid codes right again to keep this site up with working codes to help people when they need it like the admin has done for me.
So please understand we are not critisizing his work in ANY way. We are only reporting a code that did not work for both of us and I found the error that made it work again.
Dont tell us to back off.
Sorry.
|
|
|
Post by JZSquared on Mar 5, 2004 17:08:22 GMT -5
Well, I see that you were only trying to help... So, I'm sorry for directing my statement towards you... I apologize... And it was really directed towards "Help" because his attitude was way out of line... So, again, I apologize... I've just dealt with a lot of people who are ungrateful to people like Simpsons Rule, and it pisses me off... So, again, I'm sorry...
|
|
JayPetey
Junior Member
So...Whats next?
Posts: 13
|
Post by JayPetey on Mar 7, 2004 17:45:53 GMT -5
its ok, as long as we understand our selves now
|
|
|
Post by drake2josh on Apr 9, 2006 17:30:17 GMT -5
it won't work for me. im kinda bummed. i did everything it told me to, but the button won't work. any1 know the problem?
|
|
|
Post by JZSquared on Apr 10, 2006 0:45:52 GMT -5
|
|
|
Post by Simpsons Rule on Jul 13, 2006 5:15:51 GMT -5
Updated. They now both work fine.
|
|