karthick prasad
karthick prasad

Reputation: 103

Window.location not working in Internet explorer

   function complete()
    {
     updateUserData(); 

     window.location = "/getans.php";
    }

    <input type="button"  id="finish" onClick="complete();" > 

Unable to redirect user to another page in IE..but it works fine in chrome and firefox

Upvotes: 2

Views: 254

Answers (1)

sbedulin
sbedulin

Reputation: 4342

Try this JSBin http://jsbin.com/coqinunacu/1/edit?html,js

document.createElement("input").complete

complete is an input property in IE, so simply renaming click handler will help

or you may also explicitly reference window.complete

<input type="button" value="click"  id="finish" onclick="window.complete()">

Upvotes: 4

Related Questions