Jump to content

Function that not working in IE


IreneLing

Recommended Posts

Hi all , in my scripts I have a drop list and its <option> values are retrieved from sql database , and once I choose any value from the drop list the value will shown in a textbox .  It's functioning well in firefox and opera except IE , is there any way to solve this problem?

 

<html>
<head>
<title>Untitled</title>
</head>
<body>
<form name="theform" onsubmit="CheckForm()">

<?php
$query="SELECT DISTINCT Custgroup FROM UserAddedRecord";

$result = mysql_query ($query);

?>
<select name="myOptions" onchange="document.theform.showValue.value=this.value" >
<?

while($nt=mysql_fetch_array($result)){//Array or records stored in $nt
echo "<option >$nt[Custgroup]</option>";

}

?>

<input type="text" name="showValue"><br>
</form>
</body>
</html>

 

Thanks for every reply .

Link to comment
https://forums.phpfreaks.com/topic/248649-function-that-not-working-in-ie/
Share on other sites

Try a closing tag on your input also.

 

<input type="text" name="showValue"></input>
OR the shorter way
<input type="text" name="showValue" />

 

Either way is a wc3 standard of doing things.

 

EDIT:

And being technical, for w3c standard br's also need a closing tag (technically :P)

<br />

^__________^ Glad I could be of help.

 

Just for future reference (If you read this post again) If it's something that one browser is having issues with, and the others aren't it's not PHP code that's the problem. PHP Is server side, and the browser never sees anything of php until you echo it out, so if only IE is giving trouble, it has to be with the HTML/Javascript (client side).

^__________^ Glad I could be of help.

 

Just for future reference (If you read this post again) If it's something that one browser is having issues with, and the others aren't it's not PHP code that's the problem. PHP Is server side, and the browser never sees anything of php until you echo it out, so if only IE is giving trouble, it has to be with the HTML/Javascript (client side).

 

Truly thanks for your advices , I will remember it . 

 

Thanks again .

 

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.