-
1. Re: Image Rollover / Swap Image... How?
sergeysmirnov Apr 9, 2008 8:37 PM (in response to cfraser)it is just a pure client side behaviour. Why you are looking for JSF component that does this simple thing?
-
2. Re: Image Rollover / Swap Image... How?
nohacks Apr 9, 2008 9:26 PM (in response to cfraser)look here...
http://www.htmlgoodies.com/beyond/javascript/article.php/3470881
Phil -
3. Re: Image Rollover / Swap Image... How?
cfraser Apr 10, 2008 6:09 AM (in response to cfraser)Why am I looking for a JSF component that does this?
There are a couple of answers to this...
1: I am a bit of a newbie at this, and, well, that says a lot :-)
2: I am using javascript at the moment, and it is a bit ugly... big long onmouse events calling javascript code with image locations and Ids.. then there is the placement of the javascript to consider (see next point).
3: I am using facelets templating, and in the 'child' component I want to use a rollover image... the current example is for a navigation bar.
I understand it is best to put JavaScript stuff in the HTML head tag...
I am not sure yet which pages will have this navigation bar, and often the pages that would have it would be layered quite deep with templates...
Therefore I don't really know yet which top level templates... the ones with the html and head tags... would be getting rollover images eventually.
I could go and update all the top level templates to include rollover image functionality, just in case a component might get inserted that may use a rollover images... but it just feels a bit strange doing this.
Does this make any sense?
4: I thought the tool tip component was sort of similar... you can get this via client side javascript coding also, but it is much easier to use than with required javascript.
So there are a couple of reasons why I thought it would be nice if there was an image swap/rollover component (and thought there might be one somewhere that I missed).
But point 1 really comes into play... I am not really sure on the best way to do things (yet) :-)
Thanks for the pointers... I am checking out the htmlgoodies to see if it is a bit simpler than the javascript I already have.
Regards
Colin