Focal Point
<RESOLVED> onmouseover event to change picture image

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2547081806

August 10, 2011, 09:50 AM
kadkins
<RESOLVED> onmouseover event to change picture image
Not a WebFOCUS related question per se but hopefully someone will be able to assit...

I have a dashboard created using the HTML composer in Dev Studio that contains image files. I would like to add an onmouseover event to reference a different image file loacated in the same directory as the orgiinal. For some reason this isn't working like I would expect. Are there any tricks or nuances that I need to be aware of in the HTML composer?

Thanks in advance.

This message has been edited. Last edited by: kadkins,


Linux x86
Apache
Excel, CSV, HTML, PDF
August 10, 2011, 10:15 AM
Wep5622
You don't tell what it isn't doing.

The better approach to the problem, however, is something like this: http://www.alistapart.com/articles/sprites/


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
August 11, 2011, 09:30 AM
kadkins
Sorry, it's not doing anything "onmouseover" instead of changing the pic as I would expect.

Thanks for the link. I'll check it out.


Linux x86
Apache
Excel, CSV, HTML, PDF
August 11, 2011, 10:23 AM
Wep5622
Try putting an alert('something'); in the function your mouseover event attempts to call. That way you can see whether it's actually getting to that point.

A few things to check:

I'm pretty sure that if you'd be referring to your image using the wrong URL, that your mouseover image would at least blink a bit if you hover over it. So that's probably not where the problem is.

Personally I prefer to debug things like these using Firebug (a Firefox addon) and putting a breakpoint at the event-handler function for that mouseover event. It's a very good tool, but you do need to know a bit about javascript to use it effectively.
(Also note that the latest WebFOCUS-certified version of firefox is 3.5.7. Most people allow it to update automatically, in which case you get firefox 5)


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
August 11, 2011, 02:12 PM
kadkins
Thanks Wep. My issue was, as you mentioned, the multiple copies of the javascript function... one of which was blank Confused

Anyways, I cleared that up and it is now working exactly as I would expect.

Thanks again!


Linux x86
Apache
Excel, CSV, HTML, PDF
August 12, 2011, 04:45 AM
Tony A
quote:
debug things like these using Firebug

You can also debug within IE using their tool accessible by pressing F12. I understand that it is similar to firebug.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
August 12, 2011, 05:51 AM
Wep5622
True, but that tool is only available if you installed some other piece of software. IIRC the IE debugger "plugin" automatically gets installed with Visual Studio. Still, it helps with figuring out which incompatibilities in IE broke your code :P


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :