Web Analytics Made Easy -
StatCounter Need rotation to be added to my javascript code - CodingForum


No announcement yet.

Need rotation to be added to my javascript code

  • Filter
  • Time
  • Show
Clear All
new posts

  • Need rotation to be added to my javascript code

    Hi All!

    I'm new to the forums but discovered this site while looking for a solution to my javascript problem. I was able to find/manipulate the following code for changing a banner when a person mouse-overs a button. It is almost exactly what I want it to do, except that I'd like the following functionality to be added to it:

    1) When a person hovers over a button, the image that appears should be clickable and open a webpage.

    2) I would like to have the banners cycle/rotate by default until a person hovers over a button. When they hover, it should stop the cycle/rotation.

    Here is an example of what the code produces prior to my desired tweaks above:


    Here is the code I currently have:

    <script language="JavaScript">
    function update(url,index,isSuper) {
    <div style="margin-left: 30%;">
    <table cellpadding="0" cellspacing="0" border="0" width="234">
    		<td colspan="8"><img src="images/hipaa-logo.png" name="PhotoBig"></td>
    		<td colspan="8"><img src="images/w_spacer.gif" width="1" height="5"></td>
    		<td width="120">&nbsp;</td>
    		<td width="24"><a onMouseOver="update('images/alz-logo.png', 0, false); return false;"><img src="images/button1.png"></a></td>
    		<td width="21"><a onMouseOver="update('images/ecomm-logo.png', 1, true); return false;"><img src="images/button2.png"></a></td>
    		<td width="21"><a onMouseOver="update('images/facebook-logo.png', 2, true); return false;"><img src="images/button3.png"></a></td>
    		<td width="21"><a onMouseOver="update('images/hipaa-logo.png', 3, true); return false;"><img src="images/button4.png"></a></td>
    		<td width="27"><a onMouseOver="update('images/swain-logo.png', 4, true); return false;"><img src="images/button5.png"></a></td>
    Any suggestions would be GREATLY appreciated!