How are you doing searches with Javascript? Last time I checked Javascript could not connect to a database... are you searching text files or something?
Either way, you are most likely going to have to store the values into a hidden text field and tehn pass them onto another page using the POST method.