Results 1 to 2 of 2

Thread: passing values to and from text boxes incompatible in IE

  1. #1
    Join Date
    Jan 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default passing values to and from text boxes incompatible in IE

    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

    PHP Code:
    <html>
    <
    head>
    <
    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')
            
    _form.action="/enginesearch";
        else if(
    product_type == 'TRANNY')
            
    _form.action="/transearch";
        else
            
    _form.action="/othersearch";

        
    _form.submit();
    }
    //-->
    </script>
    <title>Search</title>
    </head>
    <body>
                    <form method="get" name="searchKeyword" action="/enginesearch">
                        <input type="hidden" name="prod" />
                        <table cellspacing="0">

                            <tr>
                                <td>
                                    <input type="text" name="SEARCH_STRING" value="Enter Your Search Here" tabindex="1"/>
                                       <input type="hidden" name="FILTER_INACTIVE_PRODUCTS" value="Y"/>
                                </td>
                                <td>
                                    <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
                                    </select>

                                </td>

                                <td>
                                    <input type="submit" onclick='javascript:getSubmit(document.searchKeyword.SEARCH_STRING.value);' alt="Search" width="58" height="22" tabindex="3" />
                                </td>
                            </tr>
                        </table>
                    </form>
    </body>
    </html> 
    Last edited by SK USA; 01-27-2008 at 05:42 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    figured it out.

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •