Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Guys

I am trying to load an aspx page by using jQuery .load().

I have two pages namely Home.aspx and About.aspx. Both have a common site.master page. In the master page, i am adding the reference to the jquery 1.10.x cdn. In my script (in Home.aspx) I am using this code

JavaScript
<script type="text/javascript">
$(document).ready(function () {
    $.ajaxSetup({ cache: false });
    $(".click").click(function () { //click is the class name of a button in home.aspx
//       //alert("Hi");
        $("html").load("About.aspx");

    });
});
</script>


The about.aspx did not load and while debugging i found this error 'event.returnValue is deprecated. Please use the standard event.preventDefault() instead.' Can anybody help. Thanks in advance.
Posted
Updated 14-Dec-13 8:31am
v2
Comments
Where have you used event.returnValue?
Krishna Siva 14-Dec-13 23:47pm    
nowhere pal..but i saw the error coming up whild dubug from the jquery.min.js

1 solution

Its been reported widely in Jquery 1.10 version and been fixed in 2.1 version.

http://bugs.jquery.com/ticket/14282[^]

http://bugs.jquery.com/ticket/14320[^]

So using the latest version should work fine.

Latest browsers stopped supporting event.returnValue so that Jquery has come up with a fix.
 
Share this answer
 
Comments
Krishna Siva 15-Dec-13 6:01am    
Thanks :). Used $.ajax with success function and works. Jquery 2.x never supports ie8. So, going on with this. Thank you very much for the answer.
JoCodes 15-Dec-13 7:23am    
Welcome Krishna :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900