Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DropDownList Issue with Firefox

Reply
Thread Tools

DropDownList Issue with Firefox

 
 
Olivier Verdin
Guest
Posts: n/a
 
      02-09-2005
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmlsbCBCb3Jn?=
Guest
Posts: n/a
 
      02-09-2005
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
>
>
>

 
Reply With Quote
 
 
 
 
Olivier Verdin
Guest
Posts: n/a
 
      02-09-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> >
> >
> >



 
Reply With Quote
 
Oleg Ogurok
Guest
Posts: n/a
 
      02-09-2005

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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DropDownList inside GridView: How to set SelectedIndex for the DropDownList? keithb ASP .Net 1 11-01-2006 05:24 AM
GridView: Filter DropDownList for another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-29-2005 07:44 AM
GridView: Filtr DropDownList from another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-23-2005 01:31 PM
databinding a Dropdownlist to another dropdownlist tshad ASP .Net 8 10-19-2005 10:00 PM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 ASP .Net 1 10-02-2005 05:07 PM



Advertisments