Added JavaScript to generate query string for searchfield