Connecting Tech Pros Worldwide Help | Site Map

How to: Select from Dynamic drop down menus using script

Newbie
 
Join Date: Aug 2007
Posts: 3
#1: Aug 20 '07
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?
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Aug 20 '07

re: How to: Select from Dynamic drop down menus using script


Quote:

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.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#3: Aug 20 '07

re: How to: Select from Dynamic drop down menus using script


Quote:

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.
Expand|Select|Wrap|Line Numbers
  1. var newwin = window.open('...',...);
  2. newwin.document.getElementById('selObj').value='blah';
  3. new.document.getElementById('btnObj').click();
Reply


Similar JavaScript / Ajax / DHTML bytes