pass value from Javascript to asp page

E

eddie wang

I have one asp page with javascript to begin. In the Javascript, I have
drop down list value. How can I passdrop value to asp page easily? For
example, if the user selects the value, the asp page will refresh itself
with the new value right away. Thanks.
 
M

Michael Winter

I have one asp page with javascript to begin. In the Javascript, I have
drop down list value. How can I passdrop value to asp page easily? For
example, if the user selects the value, the asp page will refresh itself
with the new value right away. Thanks.

Either submit the value as part of a form, or append the value to the URL:

window.location = 'somePage.asp?list=' + dropValue;

The former is preferred as it should work on JavaScript-disabled browsers,
other circumstances willing.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top