Jillian,
> I've got an unusual problem.
>
> I have a Javascript that rotates through a series of books (images/text
> w/links). It's very simple. It works in IE and NS 4.x... But it doesn't
> workin Mozilla / NS 7... nothing appears on the screen. How can I modify
> this script/div so that it will display in all browsers?
The code doesn't comply w/the W3C standard--which is why it won't work in
Gecko-based browsers. Change the following code:
> if (document.layers) {
> document.layers["myDiv"].document.open();
> document.layers["myDiv"].document.write(rs);
> document.layers["myDiv"].document.close();
> } else {
> document.all["myDiv"].innerHTML = rs;
> }
> }
To:
if (document.layers) {
document.layers["myDiv"].document.open();
document.layers["myDiv"].document.write(rs);
document.layers["myDiv"].document.close();
} else if (document.getElementById) {
document.getElementById("myDiv").innerHTML = rs;
} else {
document.all["myDiv"].innerHTML = rs;
}
}
While I believe the innerHTML is actually in the W3C spec, it should work
with all the modern versions of the browsers out there.
- Dan
.......................................
: Name: Dan G. Switzer, II :
: E-mail: [EMAIL PROTECTED] :
: Blog: http://blog.pengoworks.com/ :
:.......................................:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4