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>

Link to comment
Share on other sites

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");
?>

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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>

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.