PDA

View Full Version : How backwards compatible is this script?


MattyUK
12-02-2002, 05:44 PM
Hi All

Relevent Script code:
var ba='various HTML code';
test.innerHTML=ba;

Relevent HTML:
<DIV id="test" name="test" style="position:relative; z-index:1; overflow: visible; visibility: visible"></DIV>

How cross and backward compatible would that be? I need it to work on IE5.00 but am unsure of how to find out and can't test it on that browser.

Also if the DIV tag is nested in another it doesn't seem to find it. Any ideas why that might be?

Is there a better way of getting the same effect?

MattyUK

beetle
12-02-2002, 06:17 PM
The innerHTML property should be recognized in:

IE4+ PC
IE5 Mac
Gecko browsers (Recent Netscape, Mozilla, Konqurer)

I'm not sure about Opera 6 and 7, but I know it doesn't work in Opera 5.

Here (http://www.xs4all.net/~ppk/js/innerhtml.html) is a good link about using innerHTML and the alternative

MattyUK
12-02-2002, 06:50 PM
The response was good and the link was great. Thank you.