Hey Turf
if you MUST have this data submitted by a form, this can get really ugly really quickly (as opposed to the javascript version)
so I wrote you a javascript version that you can use on your main page to determine where to send the user
If you don't like the javascript way, you can use the redirect page and send all of the form's data to the querystring, or you could create a hidden form page, which can get pretty nasty. I would personally use JavascriptCode:<html> <head> <script language="javascript"> function submitIt() { // get country var sCountry = new String(document.frm1.lstCountry.value.toUpperCase()); var sActionPage = new String(); // determine which page to send form to if (sCountry == "USA") { sActionPage = "page2.asp"; } else if (sCountry == "CANADA") { sActionPage = "page3.asp"; } // set form action document.frm1.action = sActionPage; // submit form document.frm1.submit(); return; } </script> </head> <body> <form name="frm1" method="post" action=""> <select name="lstCountry"> <option value="USA">USA <option value="CANADA">CANADA </select> <input type="button" onclick="submitIt();" value="Submit"> </form> </body> </html>
Tom




Reply With Quote