Execute JavaScript After Page Load

Example: <script> function callMe(){ alert(“function is called”); } </script> <body onload=”callMe()”>

Posted in: HTML, JavaScript, Solutions

How To Parse JSON In JavaScript

JSON.parse() function is used for JSON parsing in JavaScript because most browsers support that function.

Posted in: JavaScript, Solutions

How to open popup window in JavaScript

Example: JavaScript function popitup(url,title,w,h) { var left = (screen.width/2)-(w/2); var top = (screen.height/2.20)-(h/2); var targetWin = (url, title, ‘toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=’+w+’, height=’+h+’, top=’+top+’, left=’+left); }

Posted in: HTML, JavaScript, Solutions

Validate a phone no. in JQuery

Example: JQuery

Print selected web contents in JavaScript

Example: Css @media print { .no-print { display:none } }

Posted in: CSS, HTML, JavaScript, Solutions

JQuery input controls blank space validation

Example: JQuery

Get image height & width in JavaScript?

Example: JavaScript function getImgInformation(){ var img = document.getElementById(‘myPic’); var width = img.clientWidth; var height = img.clientHeight; alert (“Width: ” + width + ” ______ Height: ” + height); }

Posted in: HTML, JavaScript, Solutions

Loop through objects in JavaScript

Example: var bookList = { “Book1″: “Php”, “Book2″: “JQuery”, “Book3″: “”, “Book4″: “Css”, “Book5″: “Xml” }; for (var key in bookList) { if (bookList.hasOwnProperty(key)) { document.write(key + ” -> ” + bookList[key] + ” “); } }

Posted in: JavaScript, Solutions
Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .