Results 1 to 2 of 2

Thread: Timers in javascipt

  1. #1
    Join Date
    Jun 2009

    Timers in javascipt

    Hi All,

    I have created a javascript that uses the onmouseover command to display certain text of a left navigational menu. The problem is that i need for the text to be displayed 1 or 2 seconds after the onmouseover command is triggered. I have tried to use different versions of timers but have been unable to get this to work.

    Does anyone know how to put a timer on a onmouseover command? Any assistance would be most appreciated.

  2. #2
    Join Date
    Apr 2007
    Here you go. This shows a div and writes content to it. I'm sure you can make it fit your needs. vwphillips helped me with this just last week.

    HTML Code:
    <script language="JavaScript">
    var myTimer;
    var x;
    var y;
    function get_xy(event){
    	x = event.clientX;
    	y = event.clientY;
    function viewMe(id){
            var myId=document.getElementById(id);
            //capture the  mouse
            myId.style.position = "absolute";
            myId.style.top = y + 10 +"px";
            myId.style.left = x + 10 +"px";
            myId.innerHTML="Write me in that div";
    function show(id){
    function hide(id){
    <a href="javascript:void(0);" 
    <div id="myDiv" style="border:1px solid black;display:none;"></div>
    Anti Linux rants are usually the result of a lack of Linux experience, while anti Windows rants are usually a result of a lot of Windows experience.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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