This function works in IE8/9. It fails in CHROME. See error below.
function runSearch() {
var tmptarget = (document.forms(0).target);
Error returned by CHROME --->
Uncaught TypeError: Property 'forms' of object #<HTMLDocument> is not a function
Additional lines of code below:
var tmpaction = (document.forms(0).action);
document.forms(0).action = "SSearch.aspx?SEARCHTYPE=" + encodeURI(document.getElementById("SSearchType").options[document.getElementById("SSearchType").selectedIndex].value) + "&SSEARCHVALUE=" + encodeURI(document.getElementById("SSearchValue").value);
document.forms(0).target = "_self";
document.forms(0).submit();
document.forms(0).target = tmptarget;
document.forms(0).action = tmpaction;
}
Any help would be great! I need to know what to do to make
this run in both IE and CHROME.
gamc2
function runSearch() {
var tmptarget = (document.forms(0).target);
Error returned by CHROME --->
Uncaught TypeError: Property 'forms' of object #<HTMLDocument> is not a function
Additional lines of code below:
var tmpaction = (document.forms(0).action);
document.forms(0).action = "SSearch.aspx?SEARCHTYPE=" + encodeURI(document.getElementById("SSearchType").options[document.getElementById("SSearchType").selectedIndex].value) + "&SSEARCHVALUE=" + encodeURI(document.getElementById("SSearchValue").value);
document.forms(0).target = "_self";
document.forms(0).submit();
document.forms(0).target = tmptarget;
document.forms(0).action = tmpaction;
}
Any help would be great! I need to know what to do to make
this run in both IE and CHROME.
gamc2