Active desktop problem..

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 :)
 
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 profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back