Setting visibility of asp.net elements through java script

If you are trying to show/hide a div or any other element via JavaScript (Java Script) and it appears to work on some browsers and not on others then one of the possible causes of failure is that you might be setting its visibility and display to “visible” and “block” etc What you need to do is to set the display of the element like this

document.getElementById(‘id’).style.display = ; //empty string

this works for all browsers as far as my experience is concerned

happy hunting

cheers

Irfan Yar

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.