DropDownList Issue with Firefox

Discussion in 'ASP .Net' started by Olivier Verdin, Feb 9, 2005.

  1. Hi,

    I have a page with several Textboxes and several DropDownList. When I click
    on a 'save' button, it creates a record in a database.

    The page works fine under Internet Explorer.

    It does not work under FireFox. The dropdownlist are always selecting the
    zero index value. If I debug and I stop the program in the page_load, the
    dropdownlist are already set to zero index.

    Anyone can help me?

    Thanks,

    Olivier
     
    Olivier Verdin, Feb 9, 2005
    #1
    1. Advertising

  2. Olivier, I can't speak to the browser differences, but if you're counting on
    the fact that while the first item is shown it's not actually selected yet,
    I'd suggest in the interests of usability you either: a) always select your
    first item via code if it's the default or b) create a "select one" item as
    the first item if there is no good default, and make sure it fails your
    validation if the user doesn't change it.

    I've always thought it odd there can be an item showing that's not really
    selected, and it wouldn't surprise me for that to behave differently on
    different browsers.

    Bill

    "Olivier Verdin" wrote:

    > Hi,
    >
    > I have a page with several Textboxes and several DropDownList. When I click
    > on a 'save' button, it creates a record in a database.
    >
    > The page works fine under Internet Explorer.
    >
    > It does not work under FireFox. The dropdownlist are always selecting the
    > zero index value. If I debug and I stop the program in the page_load, the
    > dropdownlist are already set to zero index.
    >
    > Anyone can help me?
    >
    > Thanks,
    >
    > Olivier
    >
    >
    >
     
    =?Utf-8?B?QmlsbCBCb3Jn?=, Feb 9, 2005
    #2
    1. Advertising

  3. The point is not the usability.

    The dropdownlist are selected depending on a value in a record in a
    database.

    DropDownList show the right value when first displayed. Then the user
    changes one of the dropdownlist and click save. The system must take the
    new selected value and update the record.

    This work fine with IE not with Firefox. That's the issue.

    Considerations on usability is not the point to my request. Thanks anyway
    for your remark. It will perhaps help someone else.

    The question is still open. What is the difference between IE and Firefox
    in managing the dropdownlist?

    Thanks for your help,

    Olivier


    "Bill Borg" <> wrote in message
    news:...
    > Olivier, I can't speak to the browser differences, but if you're counting

    on
    > the fact that while the first item is shown it's not actually selected

    yet,
    > I'd suggest in the interests of usability you either: a) always select

    your
    > first item via code if it's the default or b) create a "select one" item

    as
    > the first item if there is no good default, and make sure it fails your
    > validation if the user doesn't change it.
    >
    > I've always thought it odd there can be an item showing that's not really
    > selected, and it wouldn't surprise me for that to behave differently on
    > different browsers.
    >
    > Bill
    >
    > "Olivier Verdin" wrote:
    >
    > > Hi,
    > >
    > > I have a page with several Textboxes and several DropDownList. When I

    click
    > > on a 'save' button, it creates a record in a database.
    > >
    > > The page works fine under Internet Explorer.
    > >
    > > It does not work under FireFox. The dropdownlist are always selecting

    the
    > > zero index value. If I debug and I stop the program in the page_load,

    the
    > > dropdownlist are already set to zero index.
    > >
    > > Anyone can help me?
    > >
    > > Thanks,
    > >
    > > Olivier
    > >
    > >
    > >
     
    Olivier Verdin, Feb 9, 2005
    #3
  4. Olivier Verdin

    Oleg Ogurok Guest

    The selected index is not yet set in Page_Load because ViewState hasn't been
    restored/merged; so you can't read it there. You must attach a
    SelectedIndexChanged event handler to your drop down list and read the new
    value there.

    -Oleg.

    "Olivier Verdin" <> wrote in message
    news:...
    > Hi,
    >
    > I have a page with several Textboxes and several DropDownList. When I
    > click
    > on a 'save' button, it creates a record in a database.
    >
    > The page works fine under Internet Explorer.
    >
    > It does not work under FireFox. The dropdownlist are always selecting the
    > zero index value. If I debug and I stop the program in the page_load, the
    > dropdownlist are already set to zero index.
    >
    > Anyone can help me?
    >
    > Thanks,
    >
    > Olivier
    >
    >
     
    Oleg Ogurok, Feb 9, 2005
    #4
    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. Shapper

    Asp:DropDownList and Firefox Issues

    Shapper, May 19, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,304
    Bruce Barker
    May 19, 2005
  2. mr2_93
    Replies:
    1
    Views:
    3,602
    mr2_93
    Oct 2, 2005
  3. Alex D.
    Replies:
    1
    Views:
    796
    Alex D.
    Feb 13, 2006
  4. William LaMartin
    Replies:
    2
    Views:
    822
    William LaMartin
    Aug 16, 2008
  5. VK
    Replies:
    9
    Views:
    110
Loading...

Share This Page