I'm attempting to create a custom HTML form which submits the query to the Google Search Appliance. The results are displayed in an iframe.
Problem being is the action from the form:
http://search1.dot.state.mn.us/search?q=test&btnG=Search&site=clips01&site=clips02&client=newsline&output=xml_no_dtd&proxystylesheet=newsline&getfields=*&filter=0&num=5&proxyreload=1
I have multiple collections and I need to search across them based on the check-boxes the user selects.Problem is the:
&site=clips01&site=clips02&site=clips03&site=clips04
Needs to be:
&site=clips01|clips02|clips03|clips04
I currently have this:
Code:
$(document).ready(function() {
$('#newsclips').submit(function() {
//Get the values from the form and place them in a string
var values = $(this).serialize();
//Change the values for &site= ???
//Modify the action of the form
var action = "http://search1.dot.state.mn.us/search?" + values;
$(this).attr('action', action);
}); });
Not sure if this is the best way, I figured I could do a search & replace on the string after it was serialized. I couldn't figure out how to get it to work correctly so I stripped it out of the code I currently have and looking for a better way. Any ideas?
This is the full string being sent in the action:
Code:
http://searchappliance/search?q=test&btnG=Search&site=clips01&site=clips02&client=newsline&output=xml_no_dtd&proxystylesheet=newsline&getfields=*&filter=0&num=5&proxyreload=1