bluehope Posted June 16, 2008 Share Posted June 16, 2008 Hello everyone I have a problem with Safari. I am sending my codes...they work in Firefox, but in Safari they have a problem. When you choose option "Missing" in drop down menu, the item "no" in radio box has to be disabled, right? In Firefox it works well, but in Safari it remains able. Can anybody help me to solve this problem in Safari? My codes are as below: <html> <body> <?php echo " <script language='JavaScript' type='text/JavaScript'>"; echo "function switch_id(in_id){"; echo "if (document.getElementById(in_id).disabled)"; echo "{"; echo "document.getElementById(in_id).disabled = false;"; echo "}else{"; echo "document.getElementById(in_id).disabled = true;"; echo "document.getElementById(in_id).checked = false;"; echo "}"; echo "}"; echo "</script>"; echo "<select name='EN' id='EN'> <option value='-99 '>Select <option value='1'>No <option value='2'>Mild <option value='3'>Moderate <option value='4'>Severe <option value='5' onClick=\"switch_id('q2_no')\"> Missing "; echo "</select><br>"; echo "<input type='radio' name='q2' id='q2_yes' value='yes'>yes<br/>"; echo "<input type='radio' name='q2' id='q2_no' value='no' >no"; ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
xtopolis Posted June 17, 2008 Share Posted June 17, 2008 I found a 'similar' article relating to <button> tags for safari... but it's from 2006 Here You should debug and test that when you select NO (even though it should be disabled) that it is actually getting submitted. This means that maybe it is disabled functionally, but it might have the same visual bug where it doesn't show up as disabled. You test this by getting the value of q2 after submitting the form when q2_no should be disabled. If it returns the value of 'no', then it doesn't disable... if it returns false or null then it is disabled.. but graphically shows incorrectly. (which at that point you would either remove it completely using DOM, or add a style to it to grey it out and hope people get the picture.) Hope this helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.