I have seen this question asked in many forums, however the solution presented worked on selected browsers only. Here’s a solution I have tested that works on IE7, FireFox 3 and Chrome. Hopefully it should work on other browser versions as well!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Reload/Refresh a Page in jQuery</title>
<script type="text/javascript"
src="http://code.jquery.com/jquery-latest.js">
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#Button1').click(function() {
location.reload();
});
});
</script>
</head>
<body>
<input id="Button1" type="button" value="button" />
</body>
</html>
Drop a comment if this script does not work in any browser version.
Bookmark this link on del.icio.us (saved by 0 users)
Did you like this post?
|
|
|
||
|
|
|
|
|
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |





comments
4 Responses to "How to Refresh/Reload a Page using jQuery"if we must reload the page using a button, it's just the same like using the F5 key :D however, nice tuts :D
Great post Dude thanks a lot.
Wow thanks! .. I was wondering how to reload the page after having logged the user via ajax, to give him access to admin links!
location.reload() did exactly what i wanted..
thanks a lot its works cool
Post a Comment