Posts tagged with ‘javascript’

Javascript: Prevent page from frameset hijack

advertisement

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 unethical site nowdays like to “wrap” other people website using FRAME at their website to show other website as it’s own website. This will mislead the visitor that the content is owned by them.

Continue reading Javascript: Prevent page from frameset hijack »

Javascript: open new window with window.open()

advertisement

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 is the javascript window.open function details:-

window.open (url,windowname,attributes);

Continue reading Javascript: open new window with window.open() »