Netscape compatibility Issue 
Author Message
 Netscape compatibility Issue

Hi all,

I wrote a web page that started life displaying the time in a Edit Box.

The code is written in JavaScript and it all works fine.

The thing was I didn't want the Edit Box so instead I added the following in
the web page

<DIV ID="IDTime">Blah</DIV>

And my code then updated the time as follows

IDTime.innerhtml = TimeStr

In IE this works great.

However in Netscape this doesn't do a thing.

I know my JavaScript works because the EDIT BOX time is still working.

So I can only assume that netscape doesn't support .innerhtml ????  or DHTML
????

Is this true?
Have I done something wrong?
Is this there a work around?
Is there a plug in for NetScape?

Can somebody help me please?

Many thanks in advance?

Ian



Fri, 07 Feb 2003 03:00:00 GMT  
 Netscape compatibility Issue
Hi Ian

"innerhtml" is not in Netscape's DOM. I may be completely wrong, but try this:

with(document.elements["IDTime"].document) {
   open();
   write(TimeStr);
   close();

Quote:
}

Klaus
Quote:

> Hi all,

> I wrote a web page that started life displaying the time in a Edit Box.
> The code is written in JavaScript and it all works fine.
> The thing was I didn't want the Edit Box so instead I added the following in
> the web page

> <DIV ID="IDTime">Blah</DIV>

> And my code then updated the time as follows

> IDTime.innerhtml = TimeStr

> In IE this works great.
> However in Netscape this doesn't do a thing.
> I know my JavaScript works because the EDIT BOX time is still working.
> So I can only assume that netscape doesn't support .innerhtml ????  or
> DHTML????

> Is this true?
> Have I done something wrong?
> Is this there a work around?
> Is there a plug in for NetScape?
> Can somebody help me please?
> Many thanks in advance?

> Ian



Fri, 07 Feb 2003 03:00:00 GMT  
 Netscape compatibility Issue


Quote:
> with(document.elements["IDTime"].document) {
>    open();
>    write(TimeStr);
>    close();
> }

elements ? Maybe you wanted to say exactlier layers?

if(NETSCAPE4)
 with(document.layers["IDTime"].document) {
    open();
    write(TimeStr);
    close();
 }

and that div must be POSITIONED, otherwise it will not become
a layer.

Also <p style="psoition:absolute"> </p>  is a layer.

<DIV ID="IDTime" style="position:absolute">Blah</DIV>

is the crossbrowser markup ...

MM anno MM  (Marek M?nd aus Estland)
http://my.tele2.ee/cadorsoft/cdr_js_pkb/links.htm



Sat, 08 Feb 2003 03:00:00 GMT  
 Netscape compatibility Issue

< :-) >Thanks for the compliment, Marek.</ :-) >



Sat, 08 Feb 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VBScript Compatibility Issue with IE3.02 and ActiveX label control

2. Javascript compatibility issue in IE 3.02

3. Compatibility Issues and Server Side Scripts

4. Browser Compatibility Issue

5. Compatibility issues with NS

6. Netscape compatibility problem in JavaScript (free navigation bar)

7. Looking for advice/recommendations. Incorporating Netscape Compatibility

8. Netscape and IE compatibility problems on hiding forms

9. Netscape compatibility

10. Netscape compatibility?

11. Netscape compatibility

12. Netscape behaving badly...javascript issue...

 

 
Powered by phpBB® Forum Software