simple javascript problem..

Discussion in 'OT Technology' started by Scud, Dec 12, 2003.

  1. Scud

    Scud I'm an aquired taste.

    Joined:
    May 24, 2001
    Messages:
    1,240
    Likes Received:
    0
    Location:
    Pennsylvania
    I have an image I want to open a new window when the person rolls over it.

    how can I go about this? :x:
     
  2. onmouseover

    (aka: RTFM :fawk: )

    PS you'll probably need to wrap it in a link and put the mouseover on the anchor tag itself to ensure cross-browser/cross-platform compat.
     
  3. carlin

    carlin Guest

    Code:
    <html>
    <head>
    <script language="JavaScript" type="text/javascript">
    function hoverMethod(){
    	window.open ("http://forums.offtopic.com/images/smilies/fingersx.gif");
    	return false;
    }
    </script>
    </head>
    
    <body>
    <img src="http://forums.offtopic.com/images/smilies/fingersx.gif"  onmouseover="return hoverMethod();" /> 
    </body>
    </html>
    
    *edit: code because i am bored and didn't want to be mean :o
     

Share This Page