View Full Version : Random Page (on a hotspot)


carlsgaard
08-10-2006, 01:41 AM
Ok, I'm making a .gif menu for my up-coming webzine, kind of like the one on www.macteens.com. All the links are done by hotspots in the HTML. However, I need a button for a random page. I know the Java script for doing this to a TEXT link, but what about on a hotspot? Thanks!

J to the izzosh
08-12-2006, 08:17 PM
If by hotspot, you mean an image map, then you should be able to use the same Javascript, as both anchor tags and image map area tags use the same href attribute. Though, if you previously had the script in mouseover/out attributes, then you may need to put it into a separate Javascript with function and call that function from the href attribute, like so:

<area shape="rect" coords="0,0,100,100" href="javascript:functionName();" alt="image description" />