<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,
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:
Dev Studio has a tendency to create multiple copies of the javascript function that gets called on mouseover. That happens if you click the event in the properties tab multiple times. Remove the extra copies of the same function and you should have more success.
You may unintentionally have created event handlers on surrounding page content that overrides your mouseover event.
Maybe you have a javascript error in your function.
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
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 :