473,829 Members | 1,508 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Netscape compatibility

Hi,

I need help : I found the simplest and most precise way to open and close
submenu layers. it works perfectly with IE, but for some odd reason NS won't
recognize it.

Can anyone tell me why ?

And is there a way around the problem ?

I really like the elegance of this code and would like to keep using it.

Thanks in advance.
Roger Desparois
<head
<script language="Javas cript"`>
<!--
function Pop(name){
eval("document. all."+name+".st yle.visibility= 'visible'");
}
function Wop(name){
eval("document. all."+name+".st yle.visibility= 'hidden'");
}

//-->
</script>
</head>

<body>
<div id="prod"
Style="backgrou nd-color:#ff0000;P osition:Absolut e;Left:39px;Top :89px;Width:1
78px;Height:16p x;Visibility:vi sible;z-index:31" onmouseover="Po p('smprod')"
onmouseout="Wop ('smprod')">
<table width="178" height="16" border="0" cellspacing="0" cellpadding="0"
class="menu">
<tr>
<td align="center" valign="middle" >Volleyball</td>
</tr>
</table>
</div>

<div id="smprod"
Style="backgrou nd-color:#ff0000;t ext-align:right;Pos ition:Absolute; Left:39px
;Top:105px;Widt h:178px;Visibil ity:hidden;z-index:32"
onmouseout="Wop ('smprod')" onmouseover="Po p('smprod')">
<table width="178" border="0" cellspacing="0" cellpadding="0" class="menu">
<tr>
<td><img src="../images/espace1px.gif" width="178" height="5"></td>
</tr>
<tr>
<td align="center" valign="top">
<a href="../volleyball/en-ballons.html">B alls</a><br>
<a href="../volleyball/en-souliers.html"> Shoes</a><br>
<a href="../volleyball/en-genouillere.htm l">Kneepads</a><br>
<a href="../volleyball/en-chevillere.html ">Ankle braces</a><br>
<a href="../volleyball/en-filets.html">Ne ts</a><br>
<a href="../volleyball/en-accessoires.htm l">Accessori es</a></td>
</tr>
<tr>
<td><img src="../images/espace1px.gif" width="178" height="5"></td>
</tr>
</table>
</div>
</body
Jul 23 '05 #1
26 2211
VK
Leaving out the question of the code elegance... I feel you came here for a
quick-n-dirty solution and not for a JavaScript lessons:

<script language="Javas cript"`>
<!--
function Pop(name){
document.getEle mentById(name). style.visibilit y='visible';
}

function Wop(name){
document.getEle mentById(name). style.visibilit y='hidden';
}
//-->
</script>

WHY??
Because document.all is an Explorer's proprietary collection, other browsers
do not support it.

LATER MAY LOOK HERE:
http://www.dynamicdrive.com/dynamicindex1/index.html
(of course there are many similar places with even better code)


Jul 23 '05 #2

"VK" <sc**********@y ahoo.com> wrote in message news:41******** *************@n ews.freenet.de. ..
Leaving out the question of the code elegance... I feel you came here for a
quick-n-dirty solution and not for a JavaScript lessons:

<script language="Javas cript"`>
<!--
function Pop(name){
document.getEle mentById(name). style.visibilit y='visible';
}

function Wop(name){
document.getEle mentById(name). style.visibilit y='hidden';
}
//-->
</script>

WHY??
Because document.all is an Explorer's proprietary collection, other browsers
do not support it.

LATER MAY LOOK HERE:
http://www.dynamicdrive.com/dynamicindex1/index.html
(of course there are many similar places with even better code)





Yes. documemt.all is IE. Here's a test for Netscape 6 and above I believe:

ns6 = (!document.all && document.getEle mentById);
//ns6 = true if Netscape 6+

Netscape 4 is this:

ns4 = (document.layer s);
//ns4 = true if Netscape 4

ie4 = (document.all && !document.getEl ementById);
// ie4 = true Internet Explorer 4

ie5 = (document.all && document.getEle mentById);
// ie5 = true Internat Explorer 5 and up

I'm not sure how to integrate Firefox and Opera in this scheme.

Finally yes the scripting is fine for IE. You might consider fixing the CSS. Attributes are all lower case.
Also the relative ../images may be able to change to /images. The trouble is that in new Microsoft web
servers they have disabled relative adddressing without overhauling the new security relative addressing will no
longer work.

George Hester
_______________ _______________ ____

Jul 23 '05 #3
On Sat, 09 Oct 2004 15:23:19 GMT, George Hester <he********@hot mail.com>
wrote:

[snip]
Yes. documemt.all is IE.
Opera also supports it, and I believe ICEBrowser does, too.

[snip]
ns6 = (!document.all && document.getEle mentById);
//ns6 = true if Netscape 6+

Netscape 4 is this:

ns4 = (document.layer s);
//ns4 = true if Netscape 4

ie4 = (document.all && !document.getEl ementById);
// ie4 = true Internet Explorer 4

ie5 = (document.all && document.getEle mentById);
// ie5 = true Internat Explorer 5 and up
Browser detection, whether by interpretation of the user agent string, or
object inference, is fundamentally flawed. You don't *need* to know what
browser you're using, just what it's capable of doing.

Obviously you haven't read FAQ entry, 4.26.
I'm not sure how to integrate Firefox and Opera in this scheme.
You don't.

[snip]
The trouble is that in new Microsoft web servers they have disabled
relative adddressing without overhauling the new security relative
addressing will no longer work.


I'm glad I use Apache.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #4
"Michael Winter" <M.******@bluey onder.co.invali d> wrote in message news:opsfl0sgpw x13kvk@atlantis ...
On Sat, 09 Oct 2004 15:23:19 GMT, George Hester <he********@hot mail.com> Obviously you haven't read FAQ entry, 4.26.

Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.


If you gave a link to the FAQ article you mention I would read it.
Actually this came from soneone else on the Internet it is not mine. In any case how is it flawed?
But of course if the article you mention answers that then that is what I would be looking for. Thanks.

George Hester
_______________ _______________ ____
Jul 23 '05 #5
Lee
George Hester said:

"Michael Winter" <M.******@bluey onder.co.invali d> wrote in message =
news:opsfl0sgp wx13kvk@atlanti s...
On Sat, 09 Oct 2004 15:23:19 GMT, George Hester =

<he********@ho tmail.com> =20
Obviously you haven't read FAQ entry, 4.26.
=20
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.


If you gave a link to the FAQ article you mention I would read it.
Actually this came from soneone else on the Internet it is not mine. In =
any case how is it flawed?
But of course if the article you mention answers that then that is what =
I would be looking for. Thanks.


You've been reading this newsgroup for an awfully long time
to not know where to find the FAQ:

http://www.jibbering.com/faq/

Jul 23 '05 #6
On Sat, 09 Oct 2004 15:54:24 GMT, George Hester <he********@hot mail.com>
wrote:
"Michael Winter" <M.******@bluey onder.co.invali d> wrote in message
news:opsfl0sgpw x13kvk@atlantis ..
[snip]
Obviously you haven't read FAQ entry, 4.26.


[snip]
If you gave a link to the FAQ article you mention I would read it.
The FAQ, and links to it, are posted three times a week. It exists in the
signatures of several regular posters, and is mentioned plenty of times in
responses to posts.

You've posted to this group longer than I have. I shouldn't need to tell
you where to find the article.
Actually this came from soneone else on the Internet it is not mine.
So?
In any case how is it flawed?


It isn't reliable and can, in some instances, entirely fail to identify
the intended browser. Furthermore, scripts based on this technique often
fail to work, or take advantage of new features, in future browser
versions.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #7
"George Hester" <he********@hot mail.com> writes:
Yes. documemt.all is IE. Here's a test for Netscape 6 and above I believe:

ns6 = (!document.all && document.getEle mentById);
//ns6 = true if Netscape 6+
That also matches Opera 6 (unless identifying as IE) and Opera 5, and
possibly also Safari and Konqeror (unless they decided to support
document.all as well).
Netscape 4 is this:

ns4 = (document.layer s);
//ns4 = true if Netscape 4
Also matches OmniWeb.
ie4 = (document.all && !document.getEl ementById);
// ie4 = true Internet Explorer 4
Also matches WebTV.
ie5 = (document.all && document.getEle mentById);
// ie5 = true Internat Explorer 5 and up
Also matches Opera 7, and Opera 6 when identifying as IE.
I'm not sure how to integrate Firefox and Opera in this scheme.


FireFox is based on the Mozilla project, just as the Mozilla Browser
Suite and Netscape 6+. They act identically.

Opera 7 is not distinguishable from IE 6 using only document.all and
document.getEle mentById.
Since there are many different browsers, and always more than an
author expects, trying to recognize specific browsers is rarely
a good idea. Because some people have tried doing it anyway, and
have made pages that refuse to show themselves to some browsers,
the users of those browsers frequently make their browser detect
as another one, making detection even more impossible.

If the existence of document.all/document.getEle mentById is releveant,
because script is going to use those specific properties, then it
makes sense to test for their presence. In that case, it doesn't
matter what browser it is anyway.

<URL:http://jibbering.com/faq/#FAQ4_26>

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #8

"Lee" <RE************ **@cox.net> wrote in message news:ck******** @drn.newsguy.co m...
George Hester said:

"Michael Winter" <M.******@bluey onder.co.invali d> wrote in message =
news:opsfl0sgp wx13kvk@atlanti s...
On Sat, 09 Oct 2004 15:23:19 GMT, George Hester =

<he********@ho tmail.com> =20
Obviously you haven't read FAQ entry, 4.26.
=20
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.


If you gave a link to the FAQ article you mention I would read it.
Actually this came from soneone else on the Internet it is not mine. In =
any case how is it flawed?
But of course if the article you mention answers that then that is what =
I would be looking for. Thanks.


You've been reading this newsgroup for an awfully long time
to not know where to find the FAQ:

http://www.jibbering.com/faq/


well here we go. I went to the link and looked under 4.26: Here was their example that I assume is the way it is supposed to be done:

if (document.getEl ementById &&
document.getEle mentById('el') &&
document.getEle mentById('el'). style ) {
// We know that this browser supports getElementByID and has
// a style object, so we can set a style property.
document.getEle mentById('el'). style.color="re d";
}

That looks pretty familiar.

I didn't see anything about fundamentally flawed of what I presented earlier. Oh well thanks for the liink.

--
George Hester
_______________ _______________ ____
Jul 23 '05 #9
On Sat, 09 Oct 2004 16:28:33 GMT, George Hester <he********@hot mail.com>
wrote:

[snip]
well here we go. I went to the link and looked under 4.26: Here was
their example that I assume is the way it is supposed to be done:
It's a way. It could be made more efficient by saving the references
obtained rather than repeated look-up.
if (document.getEl ementById &&
document.getEle mentById('el') &&
document.getEle mentById('el'). style ) {
// We know that this browser supports getElementByID and has
// a style object, so we can set a style property.
document.getEle mentById('el'). style.color="re d";
}

That looks pretty familiar.
When compared to what?
I didn't see anything about fundamentally flawed of what I presented
earlier. Oh well thanks for the liink.


Hmmm.

I take it you didn't read the linked pages in that entry.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4528
by: 2obvious | last post by:
This is a pipe dream, I realize, but I'm trying to emulate the functionality of the W3C DOM-supported document.getElementsByTagName method under the very nightmarish Netscape 4. Through some sleuthing, I was able to find what serves as a document.getElementById emulator at http://www.xs4all.nl/~ppk/js/dhtmloptions.html#versionb. (Below is the code; this clever algorithm is painstakingly explained at the site above.)
4
4764
by: Federico Bari | last post by:
Good morning all from italy, i have probably a compatibility problem with a html/javascript page. The aim of the code of the file test.htm you find here following (copy the 3 files in the same directory) is to change the content of a layer, created with the <div...> tag, with an external text (clicking over an hiperlink) or with the result of a <form...> submition. The solution (I haven't been able to find anyone else) is to use a...
5
353
by: Simon Wigzell | last post by:
I pulled some 3rd party code off the internet that makes a span visible on mouseover of a link. It works fine in IE, doesn't work for Netscape, it goes into "Unknown", see it here : http://www.studioapriori.com/cavendishSimon/divtest.htm How can I make it work for all browsers? (Within reason of course!) <html> <head> <style type="text/css"><!-- ..absolute { position:absolute; visibility:hidden; }
11
1526
by: Jon | last post by:
Hi, I have a function that uses the following line: var level = document.getElementById( id); I also know the name of the element I am looking for. In Netscape Communicator 4.7, however, this doesn't work... What can I do to get the same element in this browser? Thanks!
13
4172
by: kaeli | last post by:
Can anyone explain this to me? It's driving me insane. Save this and run it in IE or Opera and then in Mozilla or Netscape 6+. In IE/Opera, I get the expected 4 alerts. In Mozilla/Netscape, I get *9*. In the example table, there are 4 rows with 4 columns each in the tbody. I'd expect 4 child nodes for the table body with 4 children each. I get those 4 plus 5 alerts in Mozilla/Netscape. I get only those 4 in IE and Opera. Note that...
3
4679
by: Don | last post by:
I can successfully force submission of a <form> using "document.formname.submit()". But, the submission doesn't appear to occur when used with Netscape. Anybody know why this is happening, and what I can do to get around this? Thanks, Don -----------== Posted via Newsfeed.Com - Uncensored Usenet News ==---------- http://www.newsfeed.com The #1 Newsgroup Service in the World!
3
1443
by: VK | last post by:
<http://browser.netscape.com/ns8/> The biggest hecs: Two totally separate, including scripting, parsing engines: Mozilla/Firefox (called "Netscape") and Internet Explorer. User can choose any of them for permanent use, but by default IE is chosen. Unless some engine is chosen for permanent use by user, the browser will switch the engines from site to site based on the predefined list
11
1679
by: Kristoffer Arfvidson | last post by:
HI! I have a question.... when designing asp.net pages in vs.net I always see that labels are transformed to <span tags... I stopped using span and div before because of its lack of compatibility with netscape... However, in asp.net it dosn´t seem to be an option... Do you guys know how compatible an asp.net page is with other browsers such
1
1668
by: MLibby | last post by:
I'm a Netscape newbie and am using it for backward compatibility testing. How do I debug javascript in Netscape? I set Netscape as the default debugger (design mode | file | Browse With) and I am able to debug code behind. However, when I try to debug the .js file the debugger doesn't hit the breakpoints! Any ideas? Mike --
0
9632
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10751
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10509
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10187
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7732
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6936
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5612
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5771
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3068
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.