Select box is not working properly after including google custom search box in web page
- by Vinay
I have got a select box and google custom search box in a page, when i choose a option from select box and navigate away from the page and again if i come back to the same page the option will not be selected (violates the default functionality of select box), The code is below
<script src="https://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en'});
google.setOnLoadCallback(function() {
var customSearchControl = new
google.search.CustomSearchControl('004920913350056953771:kpkclvhujzk');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
var options = new google.search.DrawOptions();
options.setAutoComplete(true);
options.enableSearchboxOnly("<?=$homeurl?>my_results.php", "query");
customSearchControl.draw('cse-search-form', options);
}, true);
</script>
<select multiple="yes">
<option>1</option>
<option>2</option>
</select>
If i remove the custom search script, the select box selected option will be retained even after navigating away from the page. (default functionality)
Its working fine in chrome, IE but not in Firefox.
Is there any solution for this, so that select box must work fine even in the presence of search box, but the order must be same 1) Search box 2)Select Box