Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Swapping out images

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
sogaz
Smarty n00b


Joined: 05 May 2003
Posts: 2

PostPosted: Tue May 06, 2003 12:05 am    Post subject: Swapping out images Reply with quote

I'm using Dreamweaver's rollover javascript and am trying to figure out an easy way to change the rollover image (i.e smarty_over.gif) and the off image (smarty_off.gif) to the location image (smarty_loc.gif). There are 20 or so image rollovers in my template and I only want to change the one for the page I am on. Is there a way for Smarty to do this?


<a href="/smarty.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('smarty_btn','','/media/sidenav/smarty_over.gif',1)"><img src="/media/sidenav/smarty_off.gif" alt="Smarty" name="smarty_btn" width="181" height="23" border="0"></a>

change to

<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('smarty_btn','','/media/sidenav/smarty_loc.gif',1)"><img src="/media/sidenav/smarty_loc.gif" alt="Smarty" name="smarty_btn" width="181" height="23" border="0"></a>
Back to top
View user's profile Send private message
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Tue May 06, 2003 12:35 am    Post subject: Reply with quote

Perhaps using ifs and assigns
_________________
"Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane
Back to top
View user's profile Send private message Visit poster's website
sogaz
Smarty n00b


Joined: 05 May 2003
Posts: 2

PostPosted: Tue May 06, 2003 12:48 am    Post subject: swapping out images Reply with quote

I am a newbie and I could probably figure out how to do it from scratch (create an array to generate each rollover, etc) eventually, but I thought maybe someone else had encountered this same issue and built some cool Smarty fix.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP