Forums

This topic is locked

JavaScript Clock

Posted 07 Jan 2002 12:27:07
1
has voted
07 Jan 2002 12:27:07 Adam Toohey posted:
Hi again,

I have a javaScript clock which I really like. The problem is in netscape it puts the clock in the top left corner <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle> I was wandering if there is some sort of code I can put before and after or something to hide it from netscape browsers?

Thanks in advance,

Adam Toohey

Replies

Replied 07 Jan 2002 15:55:02
07 Jan 2002 15:55:02 Joel Martinez replied:
&lt;Script language="javascript"&gt;

if (document.layers)
{
//netscape code
}
else
{
//clock code
}

&lt;/script&gt;

That should work I think
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi again,

I have a javaScript clock which I really like. The problem is in netscape it puts the clock in the top left corner <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle> I was wandering if there is some sort of code I can put before and after or something to hide it from netscape browsers?

Thanks in advance,

Adam Toohey


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
Replied 07 Jan 2002 16:01:24
07 Jan 2002 16:01:24 Adam Toohey replied:
Hi Joel,

Thanks for the swift reply. Does this code go before or after or inside or will I wrap it around?

Looking forward to your response,

Adam 2e

Replied 07 Jan 2002 16:25:30
07 Jan 2002 16:25:30 Adam Toohey replied:
Thanks, that didn't fix it but I took everything out of it that said netscape and it worked fine.

I put another post on about the image file and rollover behaviour with netscape, can I hide this from netscape?

Looking forward to your response,

Adam Toohey

Replied 07 Jan 2002 16:56:55
07 Jan 2002 16:56:55 Joel Martinez replied:
well, the snippet that I put up will check for ns4x (I should have said that on the first post, sorry)

the IF part of the script will execute if the browser is netscape, the ELSE will execute if it is not ns4. So if you want the clock code to work on anything but ns4, put it in the ELSE.

note: this wont solve your problem if you are trying to hide HTML also, this will only work for codeonly solutions.

Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/

Reply to this topic