Jump to content

[SOLVED] Select Works in Firefox, but not IE


dlebowski

Recommended Posts

Below is a portion of my form that I am using to display a value, but have the ability to change the value and submit the change to the database.  It works perfectly in Firefox, but doesn't not in IE 7.  Can anyone offer any suggestions?  Thanks as always.

 

<TD width=98 height="29" align="center">
<?

echo '<select name="ud_OnlineOnsite">';
echo '<option'.($OnlineOnsite=="ONLINE"? ' selected' : '').'>ONLINE</option>';
echo '<option'.($OnlineOnsite=="ONSITE"? ' selected' : '').'>ONSITE</option>';
echo '</select>';

?>
</td>

This is the result of a DB query.  $OnlineOnsite is populated from a field in my table.

 

<?
include("dbinfo.inc.php");

mysql_connect("localhost",$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

// get value of id that sent from form submission
$LotAuctionDate=$_GET['ud_LotAuctionDate'];
$query=" SELECT * FROM lots WHERE LotAuctionDate='$LotAuctionDate' ORDER BY LotNumber";
$result=mysql_query($query);
$num=mysql_numrows($result);

mysql_close();
?>

<table>
<TD width="69" class="maroonbar">
<center>Type</center>
</TD>
</table>

<?
$i=0;
while ($i < $num) {
$OnlineOnsite=mysql_result($result,$i,"OnlineOnsite");
?>

Thorpe,

 

Here is what I have.  What is odd is that it now will let me change a value in IE 7 from Onsite to Online, but it will not let me change it from Online to Onsite.  Any ideas on why that would be?  I'm closer than I was.  Thanks for helping.

 

<TD width=98 height="29" align="center">
<?

echo '<select name="ud_OnlineOnsite">';
echo '<option'.($OnlineOnsite=="ONLINE"? ' selected="selected"' : '').'>ONLINE</option>';
echo '<option'.($OnlineOnsite=="ONSITE"? ' selected="selected"' : '').'>ONSITE</option>';
echo '</select>';

?>
</td>

 

<td><input value ="UPDATE" type="Button" onclick="updatelotslive(ud_OnlineOnsite.value)"></td>

I finally got this one figured out after some helpful suggestions.  Here is what it needs to look like to work:

 

<TD width=98 height="29" align="center">
<select name="ud_OnlineOnsite" align=center>
<option value="ONLINE" <? if ($OnlineOnsite == "ONLINE") echo "selected"; ?> >ONLINE</option>
<option value="ONSITE" <? if ($OnlineOnsite == "ONSITE") echo "selected"; ?> >ONSITE</option>
</select>
</td>

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.