Code for jquery close event to fire parent page refresh
Parent page refresh
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Code for jquery close event to fire parent page refresh
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Tahir AnsariRank #366 · 6.8K reputationPosted Nov 7, 2023, 11:06 AM EST
In your child page (the one that needs to trigger the parent page refresh), add the following script to your HTML:
$(document).ready(function () { // Add a click event handler to the close button or element. $('#closeButton').click(function () { // Trigger the parent page refresh by using window.parent.location.reload(). window.parent.location.reload(); }); });Make sure the
srcattribute points to your child page (e.g., "childpage.aspx").