SunQuest
           HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 2nd, 1999, 12:43 AM
barry@usa.net
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I'm currently freeked out by this can someone please show me an example where NS actually works?

This works in IE:

<HTML>
<SCRIPT TYPE="javascript">
function test()
{
document.all.Barr.style.visibility = "hidden";
}
</SCRIPT>

<BODY >
<FORM>
<INPUT type=checkbox name=r1 onclick=test()>Radio1<br>

<DIV ID="Barr" Style="visibility:visible">

<INPUT type=radio name=r2 >Radio2<br>
<INPUT type=radio name=r3 >Radio3<br>
<INPUT type="text" name=r2><br>

</DIV>
</FORM>
</BODY>
</HTML>


I know I need to change this line:

document.all.Barr.style.visibility = "hidden";


but to what?


------------------
Barry

Reply With Quote
  #2  
Old December 2nd, 1999, 01:54 AM
Spookster
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Try this:

function test(){
//--document.layers detects NS
if (document.layers){
document.Barr.visibility='hide';
}
//--document.all detects IE
else if (document.all){
Barr.style.visibility='hidden';
}
}

Spookster

Reply With Quote
  #3  
Old December 27th, 1999, 12:25 PM
time2brew
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
i agree with spookster, but you need to take the style attribute off of the div

not <DIV id="Barr" STYLE...
but <DIV Id="Barr">

Reply With Quote
  #4  
Old January 24th, 2000, 04:28 PM
KliK KliK is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Rumilly, HS, France
Posts: 8 KliK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
In the STYLE properties, you have to set the attribute POSITION as ABSOLUTE. If you don't do that, your DIV element won't be considered as a LAYER in NS.

<DIV STYLE="position:absolute; .." ..

KliK


Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > DIV with IE + NS (visibility)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway