UBB.Dev
Posted By: CTM NS compatibility issues - 12/21/2002 4:08 PM
I'm writing an alternative to Dave's spoiler hack without using cookies. I'm using a +/- button on the page. The only problem is, it has no functionality in NS/Moz whatsoever.

In head:

Quote
code:
Code
<script language="JavaScript">
<!--
spoiler1=new Image()
spoiler1.src="spoiler_plus.gif"
spoiler2=new Image()
spoiler2.src="spoiler_minus.gif"
function spoilerstuff(){
if(!document.all)
return
if (event.srcElement.className=="spoiler"){
var x=event.srcElement.parentElement
if (x.all[3].style.display=="none"){
x.all[0].src="spoiler_minus.gif"
x.all[3].style.display=''
}
else{
x.all[0].src="spoiler_plus.gif"
x.all[3].style.display="none"
}
}
}
document.onclick=spoilerstuff
//-->
</script>

In body:

code:
[qb]
Code
<blockquote><img src="spoiler_plus.gif" class="spoiler" width="11" height="11" /> <font face="Verdana, Helvetica, sans-serif" size="1">spoiler:</font><hr /><font size="2" face="Verdana, Helvetica, sans-serif" style="display:none;">Testing spoiler hack... ;)</font><hr /></blockquote>
[/qb]
Any suggestions regarding how I could make this NS-compatible, please? smile

[EDIT: Ooops, forgot to give a link to the test page: http://chris.iphq.co.uk/ubbdev/spoiler2.html ]
Posted By: Dave2 Re: NS compatibility issues - 12/22/2002 11:10 PM
document.all is something MS made up...
http://www.stopbadtherapy.com/standards.shtml <-- that should be useful for it...
© UBB.Developers