Saturday, December 13, 2008

JavaScript

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
Go back

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);
}

No comments:

Bogger

Antok Mashuri