R/E/T/N
Full Member
PM me to be a coding mod and work with some of the best designers on a great forum.
Posts: 245
|
Post by R/E/T/N on Feb 9, 2006 0:46:57 GMT
Sorry about the earlier thread.. I had to delete it because my browser was experiencin problems. Here is the real code:
Main Footers
<script> /* Add link to profile in info center Created by Technical Do not repost on any forum without permission of the author. Leave this header intact. */ var td = document.getElementsByTagName ('TD');
for(t=0;t<td.length;t++){
if(td[t].colSpan == "2" && td[t].innerHTML == "Info Center" && td[t].className == "titlebg"){
td[t+2].innerHTML+=<a href = "/index.cgi?action=viewprofile">View Profile</a>"
}}
</script>
|
|
|
Post by crazynarutard on Feb 9, 2006 16:42:22 GMT
1. Use a main page location check (there is one in the open source database)
2. you use "innerHTML==Info Center", but there is more then just info center inside that cell, there is also a font tag and a bold tag. So if you don't include that the info center cell will not match and the code will not work. So just use ".match(/Info Center/)"
3. td[t+2] is the cell with the info center icon in it, don't think you want the link therer.
4. td[t+2].innerHTML+=<a href = "/index.cgi?action=viewprofile">View Profile</a>" there is no starting quotation mark, which will cause a error. And if you put a double quotation mark in the beginning you will have to escape that other double quotation marks in there. Here are some possible ways of doing it:
td[t+2].innerHTML+="<a href = \"/index.cgi?action=viewprofile\">View Profile</a>"
td[t+2].innerHTML+='<a href = "/index.cgi?action=viewprofile">View Profile</a>'
td[t+2].innerHTML+="<a href = '/index.cgi?action=viewprofile'>View Profile</a>"
5. Test your codes before posting them
LOCKED
|
|