Selected attribute for select control doesn't work in Firefox

Discussion in 'Javascript' started by eric.goforth@gmail.com, Aug 9, 2006.

  1. Guest

    Hello,

    I have the following select control:

    <SELECT name="Currency">
    <OPTION VALUE="1">$-USD-US Dollar</OPTION>
    <OPTION VALUE="2" SELECTED >£-GBP-British Pound</OPTION>
    <OPTION VALUE="3">€-EUR-Euro</OPTION>
    <OPTION VALUE="4">$-CAD-Canadian Dollar</OPTION>
    <OPTION VALUE="5">$-AUD-Australian Dollar</OPTION>
    <OPTION VALUE="6">$-NZD-New Zealand Dollar</OPTION>
    <OPTION VALUE="7">$-MXN-Mexican Pesos</OPTION>
    <OPTION VALUE="8">R$-BRL-Brazilian Real</OPTION>
    <OPTION VALUE="9">$-ARS-Argentinean Pesos</OPTION>
    <OPTION VALUE="10">Bs-VEB-Venezuelan Bolivar</OPTION>
    <OPTION VALUE="11">kr-SEK-Swedish Krona</OPTION>
    <OPTION VALUE="12">Â¥-JPY-Japanese Yen</OPTION>
    <OPTION VALUE="13">Rs-INR-Indian Rupee</OPTION>
    <OPTION VALUE="14">å…ƒ-CNY-Chinese Yuan</OPTION>
    <OPTION VALUE="15">$-HKD-Hong Kong Dollar</OPTION>
    <OPTION VALUE="16">$-SGD-Singapore Dollar</OPTION>
    </SELECT>

    When I view it in IE6 British pounds show as being selected. When I
    view the page in Firefox 1.5.0.6 US Dollars show as selected. Any idea
    why? I originally had it rendered as
    <OPTION SELECTED VALUE=2 SELECTED >£-GBP-British Pound</OPTION>

    So I've played around with putting the SELECTED before the VALUE and
    with it in it's current position. I've also played around with putting
    double and single quotes around the values.

    Thanks,
    Eric
    , Aug 9, 2006
    #1
    1. Advertising

  2. wrote:

    > When I view it in IE6 British pounds show as being selected. When I
    > view the page in Firefox 1.5.0.6 US Dollars show as selected. Any idea
    > why?


    Likely you are running into Firefox keeping the selected value when the page
    is refreshed. Leave the page and then return to it. You'll probably see it
    start to work.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 9, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Galina
    Replies:
    0
    Views:
    384
    Galina
    Dec 15, 2003
  2. =?Utf-8?B?U3RldmUgRm9yZA==?=

    BackColor attribute in HyperLink doesn't work in Firefox

    =?Utf-8?B?U3RldmUgRm9yZA==?=, Oct 7, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    556
    =?Utf-8?B?U3RldmUgRm9yZA==?=
    Oct 10, 2005
  3. J. Hall
    Replies:
    2
    Views:
    1,041
    Jeff Thies
    Apr 21, 2004
  4. Wayne Erfling
    Replies:
    0
    Views:
    453
    Wayne Erfling
    Oct 13, 2006
  5. Keiron Waites
    Replies:
    1
    Views:
    116
    Keiron Waites
    Oct 21, 2003
Loading...

Share This Page