javascript - Call/load Jquery Page -
i have login screen user logs in using jquery , ajax. that's fine. want if user logs in correctly, want load page.
i tried using document.location = "home.html"; refreshes page. want transition have when click on tag
<a href="schoolmaterials.html"> <!-- not refresh --> i don't know if explained myself clearly.
thanks
it improve load page in callback function of successful login with:
$("#the_div_container_for_new_page").load("schoolmaterials.html") updated:
it this:
$(document).ready() { function login() { //post ajax login $.post(......, function(result){ if (result.success) { // load page after successful login. $('#id_of_container_div').load("thepage.html"); return; } else { // handle error } }) } } javascript jquery html ajax
No comments:
Post a Comment