...

View Full Version : Selected option disappearing in IE



LPerkins
03-31-2009, 12:35 PM
Hi there,

I have a form with a pulldown menu ("putime") that is enabled when the associated radio button ("delivery") is clicked. I've selected one option ("Select a time") to appear when the page is loaded, and that works in all browsers.

The problem: When I click the radio button, the selected item disappears in IE, instead of remaining visible (as it does in FF).

This is my first post ever, so I hope I've followed all the rules properly, and that I've included enough code to give you context and what might be relevant to the problem (e.g., js validation?).

I'm guessing there might be a simple HTML fix, but please let me know if I should have posted this to a javascript forum instead.

http://www.pet-scripts.com/rx_refill.html




<input name="delivery" value="I will pick up my prescription" onClick="pickup()" type="radio" tabindex="22">
Pick-Up Date
<span id="pudatevalidate">
<label for="pudate"></label>
<input type="text" name="pudate" id="pudate" size="10" tabindex="23" />
<span class="textfieldInvalidFormatMsg">mm/dd/yy</span></span>

<label for="putime">Time</label>
<select name="putime" id="putime" tabindex="24">
<option value="Select a time" selected="selected">Select a time</option>
<option value="9 - 10 am">9-10 am</option>
<option value="10 am - 12 noon">10 am 12 noon</option>
<option value="12 noon - 2 pm">12 noon 2 pm</option>
<option value="2 - 5 pm">2 5 pm</option>
<option value="After Hours">After Hours</option>
</select>


Many thanks for your guidance.

Lisa

abduraooft
03-31-2009, 12:49 PM
Comment or remove

document.forms[0].putime.value="";

LPerkins
03-31-2009, 01:06 PM
Ah. I assume you've identified the problem code, and the solution should be:

document.forms[0].pudate.value="Select a time"; ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum