www.webdeveloper.com
Results 1 to 3 of 3

Thread: Help with Delay mouseover popup for help text...

  1. #1
    Join Date
    May 2007
    Posts
    1

    Help with Delay mouseover popup for help text...

    Hi,

    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.)

    function winOpen(url){
    alert("entered winOpen");

    var newwindow = window.open(url,"helpwin","toolbar=no, height=200, width=200");
    newwindow.focus();
    }


    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.

    1. Any suggestions on how to pass a string embedded within a string?
    2. Any suggestions for a better way to do a popup for help text which is frameless?

    Thanks

  2. #2
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    <a onmouseover="myTest=setTimeout('winOpen(\"help.do?val=Source\")', 1000);" onmouseout="clearTimeout(myTest);">Hover Test</a>
    Stephen

  3. #3
    Join Date
    Aug 2005
    Location
    Northampton, UK.
    Posts
    421
    why not set up a function that does summut like:

    function intervals(){
    var blah=setTimeout("function('paramaters');",time);
    }

    then call the function fromt the mouseover, that'd cure the quote problem?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles