Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Javascript Function Not Working In IE
Old 12-17-2008, 11:12 AM Javascript Function Not Working In IE
Novice Talker

Posts: 5
Trades: 0
I have a Javascript function to display a different <form> each time a drop down box is clicked. All forms are set to display: none but when one of the options in the drop down box is clicked, one appears. If another is clicked, the current one appearing disappears and the new one appears. It works fine in Firefox but not in Internet Explorer 6 or 7 and I don't know why. My code is as follows:

Code:
function showm(ob,ob2,ob3) {
    
    document.getElementById(ob).style.display = 'block'
    document.getElementById(ob2).style.display = 'none'
    document.getElementById(ob3).style.display = 'none'
}
HTML Code:
<form id="form1" name="form1" method="post" action="">
  <select name="changer" id="changer">
      <option value="" selected="selected">Please select your delivery area</option>
    <option value="SWD S09 UK" onclick="showm('swd_s09_uk','swd_s09_eu','swd_s09_rw')">United Kingdom</option>
    <option value="SWD S09 EU" onclick="showm('swd_s09_eu','swd_s09_uk','swd_s09_rw')">Europe</option>
    <option value="SWD S09 RW" onclick="showm('swd_s09_rw','swd_s09_uk','swd_s09_eu')">Rest of World</option>
  </select>
</form>


<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="swd_s09_uk" style="display:none;">
Paypal button
</form>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="swd_s09_eu" style="display:none;">
Paypal button
</form>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="swd_s09_rw" style="display:none;">
Paypal button
</form>
Pope Pius X2 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Javascript Function Not Working In IE
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.49692 seconds with 12 queries