ihsaan
24 Jun 2009, 05:11 PM
I have this input search field but i want when someone types a query and presses enter the results should appear in a new window. What do i change?
<form name="searchfrm2_mod" method="post" action="javascript: var searchword = document.searchfrm2_mod.mt_search.value;if(searchword=='search..'){searchword='';}document.location. href= 'http://www.website.com/index.php/Search.html?searchword=' + searchword ">
<div class="search" align="left">
<input id="search" class="inputbox" type="text" onkeypress="if(event.keyCode == 13){var searchword = document.searchfrm2_search.value;if(searchword=='search..'){searchword='';}document.location.href= 'http://www.website.com/index.php/Search.html?searchword=' + searchword }" onfocus="if(this.value=='search..') this.value='';" onblur="if(this.value=='') this.value='search..';" value="search.." size="40"/>
<form name="searchfrm2_mod" method="post" action="javascript: var searchword = document.searchfrm2_mod.mt_search.value;if(searchword=='search..'){searchword='';}document.location. href= 'http://www.website.com/index.php/Search.html?searchword=' + searchword ">
<div class="search" align="left">
<input id="search" class="inputbox" type="text" onkeypress="if(event.keyCode == 13){var searchword = document.searchfrm2_search.value;if(searchword=='search..'){searchword='';}document.location.href= 'http://www.website.com/index.php/Search.html?searchword=' + searchword }" onfocus="if(this.value=='search..') this.value='';" onblur="if(this.value=='') this.value='search..';" value="search.." size="40"/>