PDA

View Full Version : target="_blank" ???



ihsaan
24 Jun 2009, 04: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"/>

electrickeye
27 Jun 2009, 04:48 PM
found this:

<form action="file.php" method="post" target="foo" onsubmit="window.open('', 'foo', 'width=450,height=300,status=yes,resizable=yes,scrollbars=yes')">

- here. (http://www.webmasterworld.com/forum23/1219.htm)