[thelist] simple Javascript help

Drew Shiel ashiel at sportsinteraction.com
Fri Nov 1 10:05:00 CST 2002

   (The cross-browser adventure begins!)

At 09:10 01/11/2002 -0500, Joshua Olson wrote:

>What you probably want to do it hide and expose elements using css.  Each
>element on the page has a property called style.display.  Setting that
>property to "none", "block", or "inline" will affect how it's displayed.
>Play around with that and see if you can get the results you need.

   OK. What I have now is:

                         <select name="type" onChange="fnShowHide(this.value)">
                                 <option value="n">Type of Promo Tool</option>
                                 <option value="All">All</option>
                                 <option value="Banner">Banner</option>
                                 <option value="TextLink">Text Link</option>
                                 <option value="WebServices">Web
                                 <option value="Content">Content</option>
<script language=javascript>
function fnShowHide(param)
document.all.Banner.style.visibility = "hidden";
document.all.n.style.visibility = "hidden";
document.all.All.style.visibility = "hidden";
document.all.TextLink.style.visibility = "hidden";
document.all.WebServices.style.visibility = "hidden";
document.all.Content.style.visibility = "hidden";
document.all[param].style.visibility = "visible";
// -->

                                                 <div id=n
style="visibility: hidden;"></div><div id=All style="visibility:
hidden;"></div><div id=TextLink style="visibility: hidden;"></div><div
id=WebServices style="visibility: hidden;"></div><div id=Content
style="visibility: hidden;"></div>
                         <div id=Banner style="visibility: hidden;">
                         <select name=size>
                                 <option>Banner Size</option>
                                 <option>60 x 60</option>
                                 <option>120 x 60</option>
                                 <option>180 x 60</option>

Now, this works fine in IE, but Netscape complains about document.all not

Can this be done in Netscape?


Drew Shiel                               webmaster at swiftpay.com
Swiftpay -- The best way to pay online -- http://www.swiftpay.com

More information about the thelist mailing list