Click to See Complete Forum and Search --> : how to change the keyword for search


net
02-05-2003, 07:50 PM
OK
I have a search site thats supposed to open a new window and refresh everytime I press on a keyword on my first page what I want to know is (without copying the code over and over) cause if I do that all the keyword searches appear on the next page. I want to be able to just press the keyword once and it refreshes and when I press a new keyword the second page refreshes as well. without rewriting all the code again. Is this possible?

Dan Drillich
02-05-2003, 09:12 PM
Please try -


<script>
function newWin() {
var q = document.test.searchQuery.value;
var w = "searchResults.html?sq=" + q;
var new_window = window.open(w,"html_name");
new_window.focus();

}
</script>


<form name="test" action="...">
<input type="text" name="searchQuery" value="" onchange="newWin();">
<br>
<br>
<input type="text">
</form>


Cheers,
Dan