CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

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:
  #16  
Old February 9th, 2004, 11:44 AM
#ShAm4n's Avatar
#ShAm4n #ShAm4n is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2004
Location: 0ffice[c0mput3r] || (Uni())
Posts: 543 #ShAm4n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 50 m 8 sec
Reputation Power: 5
To correct the error change: SetVisibility to SetVisible (the function name)

Also change in the function body:
obj.visibility

to

obj.style.visibility

Should work now, but hit me back just to check anyways.

Reply With Quote
  #17  
Old February 9th, 2004, 12:06 PM
toolman toolman is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Posts: 819 toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 4 Days 10 h 16 m 20 sec
Reputation Power: 5
Thanks its all working now. So now it will work in most browsers right?

Reply With Quote
  #18  
Old February 9th, 2004, 12:18 PM
#ShAm4n's Avatar
#ShAm4n #ShAm4n is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2004
Location: 0ffice[c0mput3r] || (Uni())
Posts: 543 #ShAm4n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 50 m 8 sec
Reputation Power: 5
Definitely!


enjoy.

Reply With Quote
  #19  
Old February 9th, 2004, 12:41 PM
toolman toolman is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Posts: 819 toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 4 Days 10 h 16 m 20 sec
Reputation Power: 5
Just wondering... what exactly does the below script do?


<script type="text/javascript" language="javascript">


function SetVisible(elementID, visible)
{
var obj = null;

if(document.getElementById)
obj = document.getElementById(elementID);
else if(document.all)
obj = document.all[elementID];

if(obj != null)
{
if(visible == null)
visible = true;

obj.style.visibility = (visible ? 'visible' : 'hidden');
}
}
</script>

Reply With Quote
  #20  
Old February 9th, 2004, 01:32 PM
#ShAm4n's Avatar
#ShAm4n #ShAm4n is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2004
Location: 0ffice[c0mput3r] || (Uni())
Posts: 543 #ShAm4n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 50 m 8 sec
Reputation Power: 5
>> Just wondering... what exactly does the below script do?

Explanation:

function SetVisible(elementID, visible)
{
var obj = null; // initialize var obj, in case none of the object detection methods succeed

if(document.getElementById) // is getElementById method supported by this browser?
obj = document.getElementById(elementID); // it is, try to retrieve element's object
else if(document.all) // is document.all supported by this browser?
obj = document.all[elementID]; // it is, try to retrieve element's object

if(obj != null) // was the object retrieved?
{
if(visible == null) // it was; was variable visible defined a value?
visible = true; // no, assume user wants to make element visible

obj.style.visibility = (visible ? 'visible' : 'hidden'); // set new element's visibility property
} // end_ if
} // end_function_body


BTW:

getElementById
This is the method being used by almost all the browsers nowadays according to the W3C specs. (including IE's newest versions)

document.all
Internet Explorer's way of addressing objects.

Hope this clarified you.

Last edited by #ShAm4n : February 9th, 2004 at 01:34 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > css rollover


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 2 hosted by Hostway
Stay green...Green IT