Posts under Javascripts

How to detect checkbox being checked using javascript

advertisement

jqueryDue to some limitation, i can’t use onClick javascript event to detect checkbox being checked. Alt solution to auto detect checkbox being checked in the page using jQuery javascript framework. I just embed few lines of javascript and it will auto detect all the checkbox status in a page. jQuery is too awesome. but too bad i dun really like Javascript, tat’s y i’m writing such an stupid easy tutorial for myself.

To detect checkbox being checked using jQuery javascript framework, follow the steps below

Continue reading How to detect checkbox being checked using 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() »