Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

onmouseover problen in mozilla

Question posted by: vasilanthropos (Newbie) on September 29th, 2006 01:03 PM
Hello. I have the following problem. I cannot use wright the onmouseover effect in mozilla browser. I have the following simple code. It works fine on ie(!) but it opens the same window 5 or more times when using mozilla. Any idea?

Code: ( text )
  1. <img src="1.jpg" onmouseover="load(); return true">
  2. <script>
  3. function load(){
  4. popup = window.open('www.in.gr','','scrollbars=no,menubar=  no,height=300,width=300,resizable=no,toolbar=no,lo  cation=no,status=no');
  5. }
  6. </script>
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
acoder's Avatar
acoder
Site Moderator
10,420 Posts
May 15th, 2008
10:02 AM
#2

Re: onmouseover problen in mozilla
It shouldn't do unless you mouse out and mouse over the image again a number of times.

Reply
pronerd's Avatar
pronerd
Expert
300 Posts
May 15th, 2008
08:53 PM
#3

Re: onmouseover problen in mozilla
Quote:
Originally Posted by vasilanthropos
it opens the same window 5 or more times when using mozilla. Any idea?

Code: ( text )
  1. <img src="1.jpg" onmouseover="load(); return true">
  2. <script>
  3. function load(){
  4. popup = window.open('www.in.gr','','scrollbars=no,menubar=  no,height=300,width=300,resizable=no,toolbar=no,lo  cation=no,status=no');
  5. }
  6. </script>


Try this instead. Killing the onmouseover event should stop it from re-triggering off the same event.


Code: ( text )
  1. <img src="1.jpg" id="triggerImage" onmouseover="load(this)" />
  2.  
  3. <script>
  4.     function load(tag){
  5.         popup = window.open('www.in.gr','','scrollbars=no,menubar=  no,height=300,width=300,resizable=no,toolbar=no,lo  cation=no,status=no');
  6.         this.onmouseover="";
  7.     }
  8. </script>

Reply
Reply
Not the answer you were looking for? Post your question . . .
178,103 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top Javascript / DHTML / Ajax Forum Contributors