NS question

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Why does this work in IE but not in NS?

var DefaultDiv = document.getElementById('Def');
//alert(DefaultDiv.style.display);
DefaultDiv.style.display = "none";
//alert(DefaultDiv.style.display);
'

Display is set to 'none', but nothing changes...

Shakespeare: onclick || !(onclick)

mmi's picture

They have: 457 posts

Joined: Jan 2001

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

you were right mmi, those were of no help Sad

but thanx anyway:)

anything/anyone else?

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Ha!

Found the solution here (Google Groups)

They have: 93 posts

Joined: Jun 2003

That should work in NS 6 or higher. What version are you using?

BTW you referenced your solution. I think it should be noted about this.

function hide( objectId ){
// W3C & Netscape 6
if(document.getElementById && document.getElementById(objectId)) {
document.getElementById(objectId).style.visibility = "hidden";
document.getElementById(objectId).style.display = "none";
shown[objectId] = false ;

visibility = if you can see it or not on the page, where it is positioned via the style, or parent block.

display = works very similar, except for a difference, CSS positioning and layering is not required here. This is used for items like expanding menues. The content is not show, but when given a display it will push the content in the browser. I personally have not been able to accomplish this "dynamic" effect with visibility.

[Design Alpha] -Web Services : Design,Hosting,Advertising,Software
Ask about custom pricing on hosting!!
Site Assets: [UltraGaming.com] [Blades of Warcraft]

mmi's picture

They have: 457 posts

Joined: Jan 2001

Hey Jack

Glad you found the answer (and perhaps got some other useful info about playing hide and show with objects in N).

Did you find that doc by searching? I ask because I'd be interested in the terms used. With all the material on the web related to troubleshooting stuff, I figure learning how to find solutions to problems like yours is a useful skill to have in administering a development forum as I do.

Thanks (and you're welcome Wink ).


Web Xpertz Community Forums for Webmasters & Developers

Where You Can Learn, Advise, and Have Fun in the Process

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

MMI, I used 'style.display netscape' in Google Groups.

ShaneS, thanx Smiling

mmi's picture

They have: 457 posts

Joined: Jan 2001

Thanks, Jack.

I used "ns" as you had in your post. I had a feeling that was a bad idea, or at least that I should have tried something else as well.


Web Xpertz Community Forums for Webmasters & Developers

Where You Can Learn, Advise, and Have Fun in the Process

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Gee Jack & mmi,

I would have thought you guys would have checked my site first Laughing out loud

Vinny

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Vinny! Where have you been?

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi Suzanne Laughing out loud

Quote: Where have you been?

[no comment].Smiling.Wink..[/no comment]

Vinny

mmi's picture

They have: 457 posts

Joined: Jan 2001

Quote: Originally posted by Vincent Puglia

I would have thought you guys would have checked my site first Laughing out loud

I'm not enough of a scripter to know what t' look for in all that tall grass. Wink

Quote: Vinny! Where have you been?

He just got out. :blockhead


Web Xpertz Community Forums for Webmasters & Developers

Where You Can Learn, Advise, and Have Fun in the Process

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Quote: Originally posted by Vincent Puglia
Gee Jack & mmi,

I would have thought you guys would have checked my site first Laughing out loud

Vinny

Hey Smiling How's life?

(next time I'll check your site Wink)

Shakespeare: onclick || !(onclick)

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.