this page will refresh automatically when the course window is closed

by Dr. Reva Kemmer MD 3 min read

How to distinguish between refresh the page or close the browser?

Jan 10, 2014 · The old courses worked on both sites as follows: If a course was started and a user quite part way through the course the LMS would say resume course when the user logged back in. If the course was failed then the user would see retake on the LMS when they logged back in and could then retake the course.

Which event occurs first when we refresh the page?

Nov 20, 2012 · I have a web page which has a dropdown in ViewData.aspx. On click of a link it redirects to another page where data for the dropdown can be added in AddData.aspx. On close of AddData.aspx page the ViewData.aspx is not getting refreshed with the newly added data for dropdown. Currently i am pressing F5. How to achieve this automatically.

How to refresh the parent page when the child page is closed?

Aug 15, 2021 · On the other hand, there is a closed property that is set to true when the window gets closed. You can set a timer to check that closed property and do it like this: var win = window.open ('foo.html', 'windowName',"width=200,height=200,scrollbars=no"); var timer = setInterval (function () { if (win.closed) { clearInterval (timer); alert ('closed'); } }, 1000);

How to differentiate between Tab/Window Close event and followed links event?

Feb 14, 2015 · Refresh Standard Page when Visualforce pop-up closed. I have a button on Case Layout. On click of this button Visualforce page opens up in a new window. there is one button one button "OK" on the VF page. on click of this Command button VF page closes and few fields are updating back to Case. I can see fields are updating when I refresh the Case manually.

When a popup window is closed, does it refresh?

when the popup window is closed, not when the user clicks a button to refresh the page and close the popup window

What does window.open do?

window.open will return a reference to the newly created window, provided the URL opened complies with Same Origin Policy.

Why do I need a close button?

but as a good UI design, you should use a Close buttonbecause it's more user friendly. see code below.

Can you access parent window using window.opener?

You can access parent window using 'window.opener', so, write something like the following in the child window:

Does a pop up window have a close event?

The pop-up window does not have any close event that you can listen to. On the other hand, there is a closed property that is set to true when the window gets closed. You can set a timer to check that closed property and do it like this: var win = window.open ('foo.html', 'windowName',"width=200,height=200,scrollbars=no");

Can you set a timer to check a closed property?

You can set a timer to check that closed property and do it like this:

How long did Dan Marsden wait for peer review?

Dan Marsden added a comment - 17/Jan/14 6:12 AM Waited for peer-review for over 7 days, as core maintainer I am passing to integration to force review. Thanks.

Does skipview only apply to students?

NOTE 2: The skipview setting only applies to students - if skipview is set and a teacher/admin is logged in it reacts as if skipview is set to never - this is historically because the view.php page was the only navigation point to allow a teacher to access SCORM reports.

Is Damyon Wiese integrated to master?

Damyon Wiese added a comment - 21/Jan/14 2:04 PM Thanks Dan, This has been integrated to master. In general - this could be using YUI a bit more to protect the code from browser bugs (e.g. Y.on ('load', ...), Y.on ('unload', ...), Y.later () etc. But - I tested it and it works, and you are the maintainer here.

Why do I use the unload event instead of the beforeload event?

Note that I use the unload event instead of the beforeUnload event in order to manage links to attachments properly: when a user clicks on a link to an attachment (e.g. PDF file), the beforeUnload event is dispatched, then an open/save popup is raised, and nothing more (the browser does not change the displayed page and does not dispatch the unload event). If I were using the beforeUnload event (as I did before), I would have detected a page change when there is none.

Why isn't the event X position reliable?

Relying on the event X position is also not reliable because the buttons are not placed at the same position on every browser (e.g. close button at the left). Unfortunately inspecting the clientY / pageY value of the event, as suggested by some of the answers here, is not a reliable way to determine if the unload event is being fired by as ...

Is event.clienty reliable?

Other approaches based on the event.clientY are not reliable because this value is negative when clicking on the reload or tab/window close buttons, and positive when keyboard shortcuts are used to reload (e.g. F5, Ctrl-R, ...) and window closing (e.g. Alt-F4).

Is window.event defined in IE?

My earlier solution worked for me in IE. window.event would be undefined for browsers other than IE as 'event' is globally defined in IE unlike in other browsers. You would need to supply event as a parameter in case of other browsers. Also that clientX is not defined for firefox, we should use pageX.

Can session storage be used when page is reloaded?

You can use SessionStorage for that! SessionStorage is not cleared when the page is reloaded but when it is closed. So basically you could set a key/value pair when the page is loaded, but before that you check if the key/value pair exists. If it does exists it means that the page was reloaded, if not it means that the user opened the page for the first time or in a new tab.

image