• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Active desktop problem..

K

kid23

Guest
#1
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 :)
 
K

kid23

Guest
#2
Nevermind.. I found my mistake..

<form action="javascript:CheckWebSearch()" name="fWebSearch" target="_new">

should be :

<form onSubmit='CheckWebSearch()' name="fWebSearch" target="_self">
 

Members online

No members online now.

Latest posts

Latest profile posts

Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,014
Latest member
sanoravies