PDA

View Full Version : Code Restore... (need help)



Harlem Of Nem
08-05-2007, 05:36 PM
I have had the following code input on my website.....:
<script>
var statusMessage = 'Welcome to Nemesis Clan!';
window.status = statusMessage;
var tCell= document.getElementsByTagName('TD');
for (i=0;i<tCell.length;i++){
if (tCell[i].className=="row4"){
if (tCell[i].innerHTML.match("showforum=")){
tCell[i].onmouseover=function(){this.style.backgroundColor="#330000";this.style.cursor='hand';window.status=this.getElementsByTagName('a')[0].innerHTML;}
tCell[i].onmouseout=function(){this.style.backgroundColor="";window.status=statusMessage;}
tCell[i].onclick = function(){location = this.getElementsByTagName('a')[0].href;}
}}}
var tCell2= document.getElementsByTagName('TD');
for (i=0;i<tCell.length;i++){
if (tCell2[i].className=="row4"){
if (tCell2[i].innerHTML.match("showtopic=")){
tCell2[i].onmouseover=function(){this.style.backgroundColor=" #330000";this.style.cursor='hand';}
tCell2[i].onmouseout=function(){this.style.backgroundColor=""}
tCell2[i].onclick = function(){location = this.getElementsByTagName('a')[0].href;}
}}}
</script>

.....for quite a while, but when i updated my explorer to IE7 the code would not work on the new browser but it works on any other... Is there anyway of fixing it so it would work in IE7???

???
08-05-2007, 06:04 PM
I don't think you can set status in FF, maybe not IE 7 either?

Harlem Of Nem
08-05-2007, 06:14 PM
It is possible if you go to my WEBSITE (http://www.nemesisclan.co.nr) and if somehow can view my source (highly guarded :p) you will see that i have applied a status code to hide my links... Any other reasons?

Twey
08-05-2007, 06:17 PM
By default, most browsers will prevent you from changing the status bar text. I presume IE7 has adopted this idea.

jscheuer1
08-05-2007, 06:26 PM
Well, if you are willing to mess up your page so much to begin with and really, really, really feel a need to not let the browser function as it was intended . . . Oh, wait a minute, what am I saying?

Basically, there are still ways to conceal the actual function of a link from the user via javascript, but the old default status message method no longer works in most cases. There is no reason to do this though, unless you are up to something that it is against the rules of this forum to help you with. So, have a nice day! :)

The ability of modern browsers to prevent these shenanigans is evolving and configurable. Meaning that just because something works in one browser, even another browser that is exactly the same, but configured differently may not allow it, and that subsequent versions, at some point, almost certainly will not.

Harlem Of Nem
08-06-2007, 08:03 AM
Thanks for the help peops... Still most of the code works... I was just wondering what was preventing it... I just thought a part of the code was wrong and I just couldn't see it... So it's just my browser then???