Jump to content

Is this a real bug in Safari?


bluehope

Recommended Posts

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>

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.