I am trying to do a popup on a mouseover but with a delay.
When the mouse hovers over text, I only want a popup to appear after the mouse has hovered for a few seconds.
This is what I have set up..........
Function in global js file globalfuncs.js:
(This globalfuncs.js in setup in my JSP file and works fine accessing any functions from this file.)
var newwindow = window.open(url,"helpwin","toolbar=no, height=200, width=200");
Call in the JSP file:
<a onmouseover="myTest=setTimeout('winOpen('help.do?val=Source')', 1000);" onmouseout="clearTimeout(myTest);">Hover Test</a>
I think the problem seems to be trying to pass the string 'help.do?val=Source' with the function "winOpen". i.e. 'winOpen('help.do?val=Source')', to setTimeout method.
I've tried many combinations of quotes to pass a string nested in a string. The result is nothing happens when the mouse hovers over. The alert statement in the winOpen functions is not executed.
- Any suggestions on how to pass a string embedded within a string?
- Any suggestions for a better way to do a popup for help text which is frameless?