Javascript works in Firefox not in IE8

XLITS used Ask the Experts™
I've got this javascript that works in Firefox but it fails to pass the value of the drop down box in Internet Explorer (I'm using IE8).  The script is a simple script to reload the page on the onchange event of a drop down box.  It should pass the value of the box in the URL.  Here is the script:

function HandleChange() {
       parent.document.location.href="returns.asp?csoval=" + document.forms[0].txtCSO.value;

The name of the drop down box is txtCSO.

Any help is appreciated.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
function HandleChange() {
       document.location.href="returns.asp?csoval=" + document.forms[0].txtCSO.value;


function HandleChange() {
       document.location.href='"returns.asp?csoval=" + document.forms[0].txtCSO.value+"'";
Project Lead
Top Expert 2011
Check this code...
    <script src="" language="JavaScript" type="text/javascript"></script> 
        $(document).ready(function () {
             window.location.href="returns.asp?csoval="+ $(this).val();
<form id="form1">
      <select name="txtCSO" id="txtCSO">
        <option value="option1">option1</option>
        <option value="option2">option2</option>
        <option value="option3">option3</option>

Open in new window

Kiran SonawaneProject Lead
Top Expert 2011

For cross browser safety you can use window.location rather than document.location. If you want same code then replace 'parent.document.location.href' with 'window.location.href'.


No matter what I tried with the onchange event it just wouldn't work.  I used this script and it did just what I needed in both IE and Firefox.  Thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial