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
https://forums.phpfreaks.com/topic/110503-is-this-a-real-bug-in-safari/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.