JS Search works in Firefox but not IE... please assist

C

cillic

I have a javascript search form/function located in the header pane of
a page. The search function searches a separate web-based information
database by passing a pre-formatted search URL with the addition of the
search information put into the one-field form. This script works fine
in Firefox, but nothing happens in IE. Please assist, as I am
stumped...

Pertinant JS is as follows....

function setFocus()
{
document.forms[0].Search.focus()
}

function Acms_Search()
{
IsFormComplete("frmSearch");
var x = this.document.frmSearch;
var searchText = x.Search.value;
searchText = escape(searchText);
var url = "https://some_secure_url_info"
+ searchText
+ "more_secure_hard-coded_search_parameters";
parent.DETAIL.window.location = url;
}

function AcmsSearchOnEnterKey(event,ourform)
{
if (event && event.which == 13)
Acms_Search();
else
return true;
}

function SelectSearch()
{
document.frmSearch.Search.select();
}

Pertinant HTML is as follows:

<BODY onload=setFocus()>

<form name="frmSearch">
<input type="text" name="Search" OnFocus="SelectSearch();"
onkeypress="return AcmsSearchOnEnterKey(event,this.form)"
value="search text"
style="width:80px;height:16px;border:1px solid
*#C0C0C0;padding:0px;margin:0px;font:normal 10px verdana;">
</form>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top