I am new to Javascript and would really appreciate some help with a page redirection problem. I’ve searched the Web but have been unable to find a solution.
The build_url function examines the form contents and builds a URL appropriately. I didn’t think I should have any action since the function will redirect the page. Here is the opening form tag:
<FORM name=”question_info” onSubmit=”build_url(false)”>
I also have a drop-down menu in the form such that when an item is selected, the url is also built and the page is redirected (since the form changes).
The opening select tag looks like:
<SELECT name=”type” ONCHANGE=”build_url(true)”>
The last couple lines of the function looks like:
alert(str);
window.location = str;
When I use the drop down menu, the page is redirected. When I submit the form, this function is called. The right URL is displayed through the alert() function but the page is not redirected.
Thank you for any help!
Paul