Archive for the 'Javascripts' Category

Javascript: Prevent page from frameset hijack

Tuesday, April 17th, 2007

If you would like to prevent your site being frame by other website, you can use the code below to protect your site being frame.
Basically, the javascript check if your site is being open by frameset. It check if the opening window is top or else it will refresh the page to your site URL.
Many [...]

Javascript: open new window with window.open()

Monday, October 9th, 2006

What is window.open() in javascript?
window.open() is the javascript function tat use to open new window. Many advertiser use use this javascript window.open() function to pop up or open new window (or even pop under) for their advertisement.
How to use window.open() function?
To open a new window in javascript, simply follow the script below:-
window.open (”http://www.sillycorner.com”,”windowName”);
Below [...]