Question

Asked on 2011-05-09 at 15:01:33ID: 27360745

Using onChange to pass URL variable does not work in IE7

by: jimdgar2250

Rating9.2Excellent

I have the following test case:

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  </head>
  <body>
    <label>Select:</label>
    <select size="1" name="Demo" onChange="window.location.href='./ie_onchange_fails_ex.php?opt='+this.value;">
    <?php
      for ($i = 0; $i < 10; ++$i)
        echo '<option>' . $i . '</option>';
    ?>
    </select>
  </body>
</html>

The intent is that when the user makes a selection to then re-launch the window with the selection appended to the URL. This works just fine in Chrome, Firefox & Safari. But in IE7 the value is not passed into the URL.

Are there syntax changes needed for IE to accept this?

Related Solutions

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution

View This Solution - Start Your 30 Day Free Trial
Zone
general
Tags
Participating Experts
1
Solution Grade
A

Replies

 by: erdincgc

Posted on 2011-05-09 at 16:11:46ID: 36812531

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: jimdgar2

Posted on 2011-05-09 at 16:19:01ID: 36812532

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Log In

Forgot your password?Sign up

Top Experts

  1. mplungjan

    1,840

    0 points yesterday

    Profile

BrowseAre you an Expert?