K
kid23
Guest
Hi,
I'm having a little problem with one of the features I added to my active desktop, and wondered if anybody could help
The part causing the problem is the websearch feature, I'm using a select box to choose between google, yahoo..., a text input box, and a button to launch the search.
Here's my code:
function CheckWebSearch()
{
SearchWindow = window.open(document.fWebSearch.searchtype.value+document.fWebSearch.strSearch.value,'Windowname');
}
...
<form action="javascript:CheckWebSearch()" name="fWebSearch" target="_new">
<select size="1" name="searchtype">
<option selected value="http://www.google.com/search?hl=en&q=">Google</option>
<option value="http://search.yahoo.com/search?p=">Yahoo</option>
</select>
<input type="text" name="strSearch" maxlength="256" size="22" value="">
<input type="submit" name="btnG" value="Find!!" onSubmit='CheckWebSearch()' onClick='CheckWebSearch()'>
</form>
Now my problem.. when I test all this by lauching my AD in IE, everything works fine, I can do the searches on any web sites. But when I do it from the AD itself, it opens 2 IE windows, one with the correct website (my search results), and a 2nd one containing nothing but "javascript:CheckWebSearch()" in the address bar.
Any idea how I can get rid of this unwanted 2nd window ?
Thx in advance
I'm having a little problem with one of the features I added to my active desktop, and wondered if anybody could help
The part causing the problem is the websearch feature, I'm using a select box to choose between google, yahoo..., a text input box, and a button to launch the search.
Here's my code:
function CheckWebSearch()
{
SearchWindow = window.open(document.fWebSearch.searchtype.value+document.fWebSearch.strSearch.value,'Windowname');
}
...
<form action="javascript:CheckWebSearch()" name="fWebSearch" target="_new">
<select size="1" name="searchtype">
<option selected value="http://www.google.com/search?hl=en&q=">Google</option>
<option value="http://search.yahoo.com/search?p=">Yahoo</option>
</select>
<input type="text" name="strSearch" maxlength="256" size="22" value="">
<input type="submit" name="btnG" value="Find!!" onSubmit='CheckWebSearch()' onClick='CheckWebSearch()'>
</form>
Now my problem.. when I test all this by lauching my AD in IE, everything works fine, I can do the searches on any web sites. But when I do it from the AD itself, it opens 2 IE windows, one with the correct website (my search results), and a 2nd one containing nothing but "javascript:CheckWebSearch()" in the address bar.
Any idea how I can get rid of this unwanted 2nd window ?
Thx in advance