Javascript Cycling Banners with Links


A Cycling Banner with Links

Bonus Extra: Cycling Banner with Links in a Frame

Cycling Banner with Links in a Frame

You can have a cycling banner in a frame that targets to another child frame by changing document.location.href in the newloc function to parent.target.document.location.href You would probably also want to add the target= option to the IMG tag.

So if you setup your frame like this, with you're child frame target being named road:

<Frameset rows=8%,*>
  <FRAME SRC="crossbanner.html">
  <Frameset cols=23%,*>
    <Frame SRC="crossroadwf.html">
    <Frame SRC="drivein.html" name=road>
  </Frameset>
</FRAMESET>

You would change the newloc function to:
function newloc() {
  parent.road.document.location.href =
   "http://www.ait.iastate.edu/css/Midland/"
   + adhttp[adv] }

and the IMG tag would look like:
<IMG SRC='quips.gif' WIDTH=184 HEIGHT=119
 BORDER=0 NAME="cycle" TARGET="road">

The framed version of Midland Crossroads has a live example of this technique.


    Last updated on Feb. 19, 2008.       Send comments about this page to: Joe Struss