stephen_ — 2012-11-29T08:30:14-05:00 — #1
I want to create a search form on my site which uses the same fields and options as that of another site' form from which displays the following in its url when you do a search
Could I re-create the form on my site that would search the site above using php or possbily use a client side option like jqery's serialize function? http://api.jquery.com/serialize/
cups — 2012-11-29T09:23:25-05:00 — #2
That depends if you are:
Just preparing the query string to be sent, and are then relocating the user to CouncilB's website to see the results
Preparing the query, searching CouncilB's website but showing the results on your own site (after some scraping/re-formatting)
Simply copying the query parameters to be used on your own website and your own search in which case your form simply uses the GET method.
<form action="search.htm" method="GET">
The resulting URL is
stephen_ — 2012-11-30T04:46:14-05:00 — #3
Thanks for this - i'm more looking to redirect the user to thier site so they can continue searching (the first option).
The full url when seraching on thier site is- http://www.familysupportni.gov.uk/search.htm?Service=Drug%2FAlcohol+Misuse&keyword=Keyword+Search&Council=All&Search=SUBMIT
stephen_ — 2012-11-30T05:57:39-05:00 — #4
Okay have this done using the GET method - many thanks!
cups — 2012-11-30T06:37:28-05:00 — #5
Good on you. So you changed the form action to the equivalent of "http://www.CouncilBWebsite.gov/search.htm" ?
stephen_ — 2012-11-30T06:40:19-05:00 — #6
<form name="orgSearch" action="http://www.familysupportni.gov.uk/search.htm" method="get" target="_blank" onsubmit="return validate_form()">
<select name="Service" id="service">
<option>Choose a Service</option>.......
thanks for making me think about this more logically - i'd like to add a simple clear/reset on the select fields after submiting - are there any snippits out there that could be easily added?