Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Selected option disappearing in IE

    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

    Code:
        <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

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,864
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Comment or remove
    Code:
    document.forms[0].putime.value="";
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ah. I assume you've identified the problem code, and the solution should be:

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •