Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
60
rated 0 times [  62] [ 2]  / answers: 1 / hits: 70803  / 10 Years ago, wed, april 9, 2014, 12:00:00

When a user opens this modal, they can see their shopping cart information and delete items(other jquery) on the modal.



But how could I refresh the parent page after a user closes up the modal?



I read several posts but did not find any useful information for my situation. I know I need to use something like window.location.reload(true); Where should I put that in the code?



$(function(){

$('#main').off('click.login').on('click.login',function(){

$('body').loadmodal({

id:'cart',
title:'Shopping Cart',
url:'/cartDisplay/',
width: '550px',
});


});
});


Update



    $(function(){
$('#main').off('click.login').on('click.login',function(){

$('body').loadmodal({

id:'cart',
title:'Shopping Cart',
url:'/polls/cartDisplay/',
width: '550px',

});


});

$('#cart').on('hidden', function () {
window.location.reload(true);
})

});

More From » jquery

 Answers
6

Try this.



  $(#cart).on('hide', function () {
window.location.reload();
});

[#71554] Monday, April 7, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
christianu

Total Points: 481
Total Questions: 124
Total Answers: 99

Location: Trinidad and Tobago
Member since Thu, Dec 1, 2022
1 Year ago
;