View Full Version : sending info to second page?

04-28-2006, 02:39 PM
I've used the following code to fill a dropdown box on a form from a sql database within vbscript, my question is - is there a way to pass on a parameter to the page my dropdown box calls?

function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
// End -->

<form name="form">
<select name="site" size=1 onChange="javascript:formHandler()">
<option value=<% response.write strNotes %>

04-28-2006, 04:57 PM
Just a normal form will work.

then you can use JS (not sure exactly how, sorry) to get the URI of the page.

Use <form ... method="get"> so it appears in the address bar, and that will work for you.

Like http://something.com/index.htm?var=value

php is easier and more secure, depending on your needs.

With that, it's just <?php echo $_GET['var']; ?>, and your page will show "value" right at that point.

JS involves splitting the URI at the = sign and a bit more stuff. Not too bad.. but.. why... :)