User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 331,631 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,103 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

javascript onclick is not working in IE7 & IE6

Join Date: Mar 2008
Posts: 3
Reputation: infernodeep is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
infernodeep infernodeep is offline Offline
Newbie Poster

javascript onclick is not working in IE7 & IE6

  #1  
Mar 25th, 2008
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>
<select>
<option onclick="javascript:changeDisplay('div1','block')">visible</option>
<option onclick="javascript:changeDisplay('div1','none')">hidden</option>
</select> 

Here is the JavaScript code:
<script type="text/javascript">
function changeDisplay(elem,displayMode){
document.getElementById(elem).style.display = displayMode;
}
</script>
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 12:37 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC