![]() |
| ||
| javascript onclick is not working in IE7 & IE6 hi guys , im facing a small problem with javascript,it works fine in FF,but inIE6 & IE7 nothing is happening could anyone solve this problem....plz help me. Here is the HTML code: <div id="div1" style="display: visible">Div 1</div> Here is the JavaScript code: <script type="text/javascript"> |
| ||
| Re: javascript onclick is not working in IE7 & IE6 If the script keeps running (e.g. if there is a loop we can't see, or another script), the display won't change. IE waits until the script ends to update the screen. Block and none are not valid display modes. Use visible and hidden. |
| ||
| Re: javascript onclick is not working in IE7 & IE6 Quote:
thank u for response but still it's not working... if possible can u send me the code plz its urgent once again thank u |
| ||
| Re: javascript onclick is not working in IE7 & IE6 i have used none and single quotes and it works in both IE and firefox like this var el = document.getElementById(obj); |
| ||
| Re: javascript onclick is not working in IE7 & IE6 the problem is you cant put an event on a option in IE as far as i know. so the best solution is to put the event on the select <div id="div1" style="display: visible">Div 1</div> |
| ||
| Re: javascript onclick is not working in IE7 & IE6 plazmo is right about that. In IE6/7 (no idea about later versions) options can't really have individual onclick statements. However, a quick workaround can be put together. Starting code... <select> In order to get that working, just change the onclicks to values, and add the onchange handler eval(this.value) and it will function almost identical to an onclick. <select onchange="eval(this.value);"> It's the fastest way I know to make option onclick work in IE and Mozilla. |
| All times are GMT -4. The time now is 12:11 pm. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC