views:

66

answers:

2

I want to put a search form on my site, but when you hit search, it will search another site.

For example, I have a form on mydomain.com/search that will search domain.com/search?term="keyword"

Once I hit the search button, I want it to open a new window appending the keyword to the URL.

Can this done via jQuery/PHP?

+1  A: 

It can be done with HTML.

<form action="http://example.com/search" target="_blank">

The usual issues with new windows apply.

David Dorward
+5  A: 

You do not need javascript or jQuery to do this. Just use normal HTML.

<form action="http://www.domain.com/search" method="GET" target="_blank">
T B