[Javascript] CSS and Javascript

Abyss info at abyss.ws
Sun Apr 3 04:57:04 CDT 2005


Hi All

Im trying to (with complete failur) to hide a span  when the page loads

but to display it when a certain drop down box menu is selected.


<span id="soldOrderBlock"></span>

JS code in head

if (document.all) 
   {
    document.all.soldOrderBlock.style.display='none';
   }
   else
   {
    document.layers['soldOrderBlock'].style.display='none';
   }

and calling the JS fuction like this 

showHideSelection();

from the head 

I do not want to - I cannot - use the onload part of the body because of certain bad design specs..so can anyone see what I am doing wrong?

it works with the onchange on the drop down box, just not when the page loads.

can anyone suggest as to why?

Thanks heaps...
Abyss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050403/f6199bcf/attachment.htm>


More information about the Javascript mailing list