Scripts | JS tutorials | Applets | Web Tutorials | Forum | Freewarejava

spacer.gif (810 bytes)


Please support our sponsor

Home / Free JavaScripts / Links / Here

Website Abstraction

Cut & Paste

Credit: Website Abstraction

Description: An alternate version of the popular rollover effect script that checks a check box instead when the mouse moves over a link. Not too useful, although quite amusing.

Example:

Home
JavaScript Tutorials
Free JavaScripts
Free Java Applets
Web Tutorials
FrontPage tutorials

Directions: Simply insert the below into the <body> section of your page where you want the links to appear:

Configuring the script: The script used to create the rollover effect is actually very short and simple- the majority of the code are HTML codes used to render the checkboxes. Anyhow, the key thing to understand is that each <a> tag contains the code:

<a href="test.htm" onMouseover="rollovercheck(0)" onMouseout="rolloutcheck(0)">

The integer 0 inside the parenthesis indicates that when the mouse moves over this link, it should  check the first check box (JavaScripts counts from 0, remember?). Therefore, if you have 100 links, the hundredth link will contain the code:

<a href="test.htm" onMouseover="rollovercheck(99)" onMouseout="rolloutcheck(99)">'

so when the mouse moves over it, the script correctly checks the box beside it.

Play around with the code, and you'll see what I mean.

Subscribe to our new newsletter, FREE!
Get weekly updates on Website Abstraction AND Freewarejava.com, for FREE! Subscribe to this popular web developer newsletter, and stay informed on the latest development in both JavaScript and Java.

Dynamic Drive DHTML code library
spacer.gif (810 bytes)

CopyRight © 1997-1999 Website Abstraction. All rights reserved

Click here for free Java applets!
spacer.gif (810 bytes)