Closed Thread Icon

Preserved Topic: How can I make this work in Netscape like it does in IE? Pages that link to <a href="https://ozoneasylum.com/backlink?for=17709" title="Pages that link to Preserved Topic: How can I make this work in Netscape like it does in IE?" rel="nofollow" >Preserved Topic: How can I make this work in Netscape like it does in IE?\

 
Author Thread
Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 04-20-2000 17:04

<!-------Start Code---------------------><P><html>
<head>
<title>-----< dHTML Test Site >----</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<div>
<a class="Level1" id="OUT0t"><img src="images/plus.gif" border="0" class="LEVEL1" id="OUT0i"></a>
<div style="display:none" id="OUT0s">
&nbsp;<img src="images/sub1.gif">&nbsp;<span class="Level2"></span><br>
&nbsp;<img src="images/sub2.gif">&nbsp;<span class="Level2"></span><br>
&nbsp;<img src="images/sub3.gif">&nbsp;<span class="Level2"></span></div>

<script language="JavaScript">
var img1 = new Image();
img1.src = "images/plus.gif";
var img2 = new Image();
img2.src = "images/minus.gif";<P>function doOutline() {
var srcId, srcElement, targetElement;
srcElement = window.event.srcElement;
if (srcElement.className.toUpperCase() == "LEVEL1" &#0124; &#0124; srcElement.className.toUpperCase() == "FAQ") {
srcID = srcElement.id.substr(0, srcElement.id.length-1);
targetElement = document.all(srcID + "s");
srcElement = document.all(srcID + "i");<P> if (targetElement.style.display == "none") {
targetElement.style.display = "";
if (srcElement.className == "LEVEL1") srcElement.src = img2.src;
} else {
targetElement.style.display = "none";
if (srcElement.className == "LEVEL1") srcElement.src = img1.src;
}
}
}<P>document.onclick = doOutline;<P></script>
</div>
</body>
</html><P><!--------------------End-------------------><P>

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 04-20-2000 17:09

Could the jscript be called externally also?

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 04-22-2000 01:28

ooga booga<P>Umm what are you trying to do here?
if you just put a <BASE HREF="www.your_site.com/" tag in the header we could run this from our desktops. <P>But right now it looks like you are using a bunch of style attributes that do not appear to be set anywhere. <P>You don't want to use the style attribute in the DIV tag Netscape will not recognize it. but that could be giving you some trouble.<P>What does the srcElement attribute do? I've not seen that.<P>Also you may want to put the onClick event and the function in the head of the page.<P>If you put in the Base Href I'll take another look and try to be more helpfull.<P>

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 04-22-2000 01:41

okay I think I understand better now... I think srcElement is only used inIE in Netscape I believe the attribute is ".target" <P>Also you need to ad some code to get Netscape to recognize the Click function. it should look something like
window.captureEvents(Event.MOUSEDOWN)
window.onMouseDown = doOutline<P>then the function would be doOutline(e);<P>Ugh <P>(I made up the part that says MOUSEDOWN im not sure if that is the correct attribute or not. I'm at work right now minus my books)<P>I'll check this out more over the weekend let me know if any of this helps<P>

Bruce
Bipolar (III) Inmate

From: Stafford, TX USA
Insane since: Mar 2000

posted posted 04-23-2000 18:08

What Boudga is looking for, I believe, is the ability to hide some buttons and have them exposed when a user clicks a top level button (+). Microsoft does this on the menu in their visual studio web page, but their script also doesn't work in netscape so they just take you to another web page that has the menu expanded in stead of dynamically expanding the menu like the IE browser does.<P>This is something I hope Netscape fixes in version 5. If anyone has a work around for this I too would be greatful to hear it.

« BackwardsOnwards »

Show Forum Drop Down Menu