View Full Version : passing values to and from text boxes incompatible in IE

01-26-2008, 02:26 AM
I have the code below on my site, it works in mozilla engine browsers like FireFox and Safari and Netscape but it does not work in IE.
The general search works fine. But the function of choosing a different value in the pulldown is suppose to send them to a different action form, but its not working in IE. Also "thisString" is suppose to remove a word if they enter, this as well works in FireFox but not IE

<script type="text/javascript">
function getSubmit(entry) {
var _form = document.searchKeyword;
var product_type = _form.SEARCH_PRODUCT_TYPE.value;
_form.prod.value = product_type;
var thisString;
thisString = document.searchKeyword.SEARCH_STRING.value;
thisString = thisString.replace(/carss/i, "");
document.searchKeyword.SEARCH_STRING.value = thisString;
if(product_type == 'ENGINE')
else if(product_type == 'TRANNY')

<form method="get" name="searchKeyword" action="/enginesearch">
<input type="hidden" name="prod" />
<table cellspacing="0">

<input type="text" name="SEARCH_STRING" value="Enter Your Search Here" tabindex="1"/>
<input type="hidden" name="FILTER_INACTIVE_PRODUCTS" value="Y"/>
<select name="SEARCH_PRODUCT_TYPE" class="select-cats" tabindex="2">
<option value="ENGINE">In Engine
<option value="TRANNY">In Transmission
<option value="OTHER">In Others


<input type="submit" onclick='javascript:getSubmit(document.searchKeyword.SEARCH_STRING.value);' alt="Search" width="58" height="22" tabindex="3" />

01-27-2008, 05:40 PM
figured it out.

should've used the onSubmit within the <form> tag instead of onClick