Monthly Archives: July 2014

Add/Remove class on hover by JS.

Now a day’s almost all browsers support :hover property by CSS. But sometimes we want JS to add and remove class or any other css properties on hover so that we can do easily.  …

Make your .CSS file to .PHP file.

You can compress your .css file to .php file by following procedure. 1)      Create a file “stylesheet.php” and add the code to this file.   2)      Now call this file inside to your site head….

Redirect to another page without JS.

  If you want to redirect the user after 10 seconds to another page or want to refresh the page you can add a meta tag with attributes to do this. No JS or any…

What are common DOCTYPES?

In HTML file there are several DOCTYPES according to tag which we are using. These DOCTYPES helps browsers to know the type of document to expect. DOCTYPES is not HTML tag, it gives instruction to…

Empty An Array

Try the fastest way to empty an array and other ways are also in the coding. But that codes are used to create an array. Through these codes you can reuse an array. var myArray…

How to Comment in CSS

Codes in css these codes /* */ marks as CSS comments. This allows you to enter new codes into CSS that will not be interpreted. In this case, this comment lets someone reading  in the CSS…

“Go Back” With Button.

In the browsers already have “back” buttons. Input button with inline JavaScript <input type=”button” value=”Go Back From Whence You Came!” onclick=”history.back(-1)” /> This is completely obtrusive, but you could fix that by only adding this button through…

Make your whole Divs clickable.

Want to make your whole div clickable? There is no need to add div within anchor tag (i.e. <a href=”#”>..</a>). By below code you can make your whole div clickable. By using JavaScript: <div onclick=”location.href=’Enter-URL-Here’;”…

Prevent your site from Skype toolbar icons.

Normally now a day’s user adds Skype toolbar to their browser and this makes your contact no highlighted with Skype icon and its colour. This is not good for your site as it may affect…

Building an Application in Java.

We will start by building an application that adds two numbers. Whenever you build any java application, there is asset template for design that you automatically follow. Import javax.swing.joptionpane; The compiler imports the classes you…