Loading ...
Sorry, an error occurred while loading the content.

Re: [JavaScript] Select Option List Problem

Expand Messages
  • PapaTango
    Are you using Firefox? It remembers form values that you ve had previously when you refresh the page so you don t see the default values being set. PT
    Message 1 of 4 , Nov 13, 2008
      Are you using Firefox? It 'remembers' form values that you've had
      previously when you refresh the page so you don't see the default values
      being set.


      Soren wrote:
      > I have a server side script that writes my javascript for a select
      > options. The problem I am having is that the option that I tell it to
      > set as the selected option is not showing as the selected option. On
      > teh screen it shows the option above it. It doesnt make any sense to
      > me at all.
      > For example...
      > TheForm.ReportPageOptions.options[0] = new Option
      > ("Anchorage","Anchorage", false, false);
      > TheForm.ReportPageOptions.options[1] = new Option("Bob Bruner","Bob
      > Bruner", false, false);
      > TheForm.ReportPageOptions.options[2] = new Option("Brant
      > Smith","Brant Smith", false, false);
      > TheForm.ReportPageOptions.options[3] = new Option("Chris
      > Wahlberg","Chris Wahlberg", false, false);
      > TheForm.ReportPageOptions.options[4] = new Option("Greg
      > Reichert","Greg Reichert", true, true);
      > TheForm.ReportPageOptions.options[5] = new Option("Harry
      > Whittaker","Harry Whittaker", false, false);
      > My script is selecting the right option, but on the screen it shows
      > Chris Wahlberg as being selected instead of Greg Reichert. I dont get
      > it.
      > Soren
    Your message has been successfully submitted and would be delivered to recipients shortly.