Category Archives: JAVASCRIPT

How to find the lengtth of array checkbox checked using javascript

var inputTags = document.getElementsByTagName(‘input’);
var checkboxCount = 0;
length = inputTags.length;

for (var i=0;  i<length; i++) {
if (inputTags[i].type == ‘checkbox’ &&  inputTags[i].checked) {

alert(‘Some messageg’);

return false;

How to start and stop Marquee

Here is my situation ->I need to make a Marquee stop on mouseover and start on mouseout without using java script? How can i do it? There are number of solutions. You can stop the marquee on click event, mouse over event , similarly you can start the marquee on number of javascript events.
Here are some possible ways:

  <marquee onmouseover="this.setAttribute('scrollamount', 0, 0);" onmouseout="this.setAttribute('scrollamount', 6, 0);">
      PHP Fresher     

Next sample on Mouseup and Mouse Down:

<marquee behavior="scroll" direction="left" onmousedown="this.stop();" onmouseup="this.start();"> PHP Fresher     </marquee>

Next Sample on MouseOver and MouseOut

<marquee behavior="scroll" direction="left" onmouseover="this.stop();" onmouseout="this.start();">PHP Fresher</marquee>

Similar Links
Example one
Example two

Javascript- Auto refresh page

This tutorial explains how to refresh the page in a certain interval. Sometime you need to refresh the page automatically while using the session. You need to load the latest content automatically . So the webpage need to be refreshed.

Sample code
<script type=”text/JavaScript”>

function autoRefresh(timeToRefresh) {

<p><a href=”javascript:autoRefresh(1000)”>Refresh page in 1 sec</a></p>

Next Example:

function updateDivContent(){
    // Assuming we have #shoutbox
setInterval( "updateDivContent()", 10000 );

Business services and Business news Business international onlinlen publishing Business