🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.javascript
Article #210

problem compatibily Netscape/MSIE

#210
From: Thibault
Date: Fri, 19 Dec 1997 00:00
67 lines
2038 bytes
I have a beautiful ;-) script MSIE & NC 4.0 able  to hide or add frame:
---------------------------------------
<SCRIPT>
function check()
{ 
if (top.location != location)
{
  document.frm.button.value="hide  frame"
  document.frm2.button2.value="hide frame"
   }
else
{
  document.frm.button.value="Add frame"
  document.frm2.button2.value="Add frame"
   }
}
function frame_noframe()
{ 
if (top.location != location)
{
  top.location.href = window.location.href
}
else
{
  top.location="nightfr.htm"
}
}
</SCRIPT>
<BODY>
...
<form name="frm">
<input type="button" value="Hide frame" name="button"  onclick="frame_noframe()"> 
...
<form name="frm2">
<input type="button" value="Hide frame" name="button2"  onclick="frame_noframe()"> 
...
</BODY>
--------------------------------------
BUT NN 3.0 told me that "frm2 has no properties defined as button2". Why? I really don't understand because, if I only put :
<SCRIPT>
function check()
{ 
if (top.location != location)
{
  document.frm.button.value="hide frame"
  
   }
else
{
  document.frm.button.value="Add frame"
     }
}
function frame_noframe()
    { ....
}
</SCRIPT>
<BODY>
<form name="frm">
<input type="button" value="Hide frame" name="button"  onclick="frame_noframe()"> 
...
</BODY>
It works on NN 3.x ! Where is the mistake? Can someone help me?
If you want to see application go to http://freezone.exmachina.net/RadioAlma/NightClub/test2.htm

Thib's
REPLY to thibs@infonie.be (If you speak French, I prefer because English is not my language)
Technical Details
Message-ID: <882487128.823980@dionysos>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103a72,630652d8e47e8720,start
X-Google-Attributes: gid103a72,public
From: "Thibault" <thibs@infonie.be>
Subject: problem compatibily Netscape/MSIE
Date: 1997/12/19
Message-ID: <882487128.823980@dionysos>
X-Deja-AN: 299482191
Cache-Post-Path: dionysos!unknown@ppp-92-62.infonie.be
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Organization: INFONIE Benelux
Newsgroups: fj.lang.javascript