Often, in my internet project,
I need to use the following javascript functions, that I consider
very usefull:
Reload of a page:
function reload()
{
window.self.location.reload();
}
Automatic reload of a page (after 5 seconds)
function reload()
{
window.self.location.reload();
}
self.settimeout( 'reload()',5000);
alert("Page reloaded");
Link to go back
<a href="javascript:history.back();">Go back</a>
Open a popup window
function open_popup()
{
window.open("page.html","name of the window","width=500,
height=400, left=200, top=300, scrollbars=yes);
}
|