Forum Moderators: coopster
I have a form that takes the user to a particular URL depending on the value of the form
<form name="SearchForm" method="POST" action="mysite.com/Search/$SearchKeyword">
<input type="text" size="15" name="SearchKeyword"> <input type=submit value="Search">
</form>
Now the script no longer generates the URL with the user submitted data in the URL
Instead it goes to "mysite.com/search//"
Any ideas?
THANKS
When I change to method "get"
I get the URL www.mysite.com/search/?SearchKeyword=foo
instead of putting the value of "Searchkeyord" into $SearchKeyword it appends this to the end of the action URL
Any ideas?
<input type="text" size="15" name="SearchKeyword">
<input type="button" value="Search" onclick="form_sub()">
</form>
Or did I miss something...
I might be mistaken..but you'll probably need javascript.
function form_sub(){
document.SearchForm.action = "mysite.com/Search/?SearchKeyword="+document.SearchForm.SearchKeyword.value;
document.SearchForm.submit();
}