Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Non-button image rollovers. How is this done?


Aggrowear

Recommended Posts

Hi, I have been hacking away at this cart for a while now. I want to add rollovers to images I have used for navigation in the header.php file and eventually to the tops of the info boxes.

 

After due diligence I cannot find a way to do this. I have looked at the Easy Rollovers contribution http://www.oscommerce.com/community/contributions,2054 but that only handles buttons.

 

Is there a way to do this? Keeping in mind that I don't want to loose the visitor's session id, and that some of the links would point to my 'SSL' area.

 

Here is a sample of what I looking to do:

 

<td align="left" valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'nav_03.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?></td>

 

How can I have a rollover the "nav_03.gif' ???

 

 

Thanks

Link to comment
Share on other sites

Hi, I have been hacking away at this cart for a while now. I want to add rollovers to images I have used for navigation in the header.php file and eventually to the tops of the info boxes.

 

After due diligence I cannot find a way to do this. I have looked at the Easy Rollovers contribution http://www.oscommerce.com/community/contributions,2054 but that only handles buttons.

 

Is there a way to do this? Keeping in mind that I don't want to loose the visitor's session id, and that some of the links would point to my 'SSL' area.

 

Here is a sample of what I looking to do:

 

<td align="left" valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'nav_03.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?></td>

 

How can I have a rollover the "nav_03.gif' ???

Thanks

 

that second argument to tep_href_link is for parameters, so you could use that to add onMouseOver, onMouseOut, and onClick functions to the <a href>. then just put your rollover javascript or whatnot in header.php or so.

 

so something like:

<td align="left" valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'onmouseover="swapImage(..)" onmouseout="swapRestore()" onClick="swapOther()"', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'nav_03.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?></td>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...