-
How can I hide a select element in Netscape
Hi,
I have created a menu in my web page. Some of the form elements (i.e. select)
are top of the drop down menu. So, I set the visibility to hidden for those
elements while displaying the drop down menu. It works fine in IE4. But I
don't know how to hide those controls in Netscape.....
Here is the sample code
<Script>
function HideSel()
{
document.all.cboSMDF.style.visibility = "hidden";
}
</SCRIPT>
<BODY>
<form name="frm">
<select name="cboSMDF" size="1">
<option>option1</option>
</select>
<input type=button Onclick="HideSel()" value="Hide">
</form>
Thanks for your help
Hari Somaskanthan
-
Re: How can I hide a select element in Netscape
You can't hide form elements in NS like you did for IE, but you could try
to put the select element in a layer and set the visibilty of that layer
from a call in the button click.
It might be that you have to give the select it's own form tag within the
layer, thus having two forms, to be able to have the button click act. Cause
if I remember correctly, NS doesn't like having form elements spread in different
object elements, eg one piece in one layer and another in another layer.
You'll have to try for yourself.
Mind you that you'll have to set the visibility of the layer, not the select
element itself.
cya
Frederiek
"Hari Somaskanthan" <haris1@avaya.com> wrote:
>
>Hi,
>
>I have created a menu in my web page. Some of the form elements (i.e. select)
>are top of the drop down menu. So, I set the visibility to hidden for those
>elements while displaying the drop down menu. It works fine in IE4. But
I
>don't know how to hide those controls in Netscape.....
>
>Here is the sample code
>
><Script>
>function HideSel()
>{
>document.all.cboSMDF.style.visibility = "hidden";
>}
></SCRIPT>
>
><BODY>
>
><form name="frm">
><select name="cboSMDF" size="1">
> <option>option1</option>
></select>
><input type=button Onclick="HideSel()" value="Hide">
></form>
>
>
>Thanks for your help
>
>Hari Somaskanthan
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks