How to: Select from Dynamic drop down menus using script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rpeterson84
    New Member
    • Aug 2007
    • 3

    How to: Select from Dynamic drop down menus using script

    Hello:

    I was hoping to gain some insight, a point in the right direction if you will...

    We use an .asp web page to select from a couple of dynamic drop down menus then enter a number, and press go to query the sql db.

    Is it possible to use a javascript to open the web page, and the select the options I want from a dynamic dropdown menus?

    Also selecting the option I want from the available checkboxes,
    then "clicking" go.

    Is this possible so I don't have to open the web page every time and select the options I want?
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by rpeterson84
    Hello:

    I was hoping to gain some insight, a point in the right direction if you will...

    We use an .asp web page to select from a couple of dynamic drop down menus then enter a number, and press go to query the sql db.

    Is it possible to use a javascript to open the web page, and the select the options I want from a dynamic dropdown menus?

    Also selecting the option I want from the available checkboxes,
    then "clicking" go.

    Is this possible so I don't have to open the web page every time and select the options I want?
    Java != Javascript

    Moved to Javascript forum.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Originally posted by rpeterson84
      Hello:

      I was hoping to gain some insight, a point in the right direction if you will...

      We use an .asp web page to select from a couple of dynamic drop down menus then enter a number, and press go to query the sql db.

      Is it possible to use a javascript to open the web page, and the select the options I want from a dynamic dropdown menus?

      Also selecting the option I want from the available checkboxes,
      then "clicking" go.

      Is this possible so I don't have to open the web page every time and select the options I want?
      Welcome to TSDN!

      You could use window.open to open a new window pointing to the URL of the page in question. Keep a handle to the window so that you can use it to update the page.

      You can also set the values of elements dynamically and use the click() method on the button.
      [CODE=javascript]var newwin = window.open('.. .',...);
      newwin.document .getElementById ('selObj').valu e='blah';
      new.document.ge tElementById('b tnObj').click() ;[/CODE]

      Comment

      Working...