473,396 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Hovers / Mouseovers

I got my problem from yesterday fixed. Looks like when you mouseover a link it will now bring up a preview of the article. My problem is now this, in IE the preview stays put and you can move your mouse to the bottom the the preview to read the whole article. In FF although it pulls up the preview it moves it all over the screen and you can not move your mouse into the preview to click "read more". Please help.

Expand|Select|Wrap|Line Numbers
  1. var IE = document.all?true:false;
  2. document.onmousemove=mousemove;
  3.  
  4. var tempX = 0;
  5. var tempY = 0;
  6.  
  7. function mousemove(e) {
  8.     if(!IE) {
  9.             tempX = e.pageX;
  10.             tempY = e.pageY;    
  11.         }
  12.  
  13.     return false;
  14. }
  15.  
  16.  
  17.  
  18.  
  19. function getMouseXY(e) {
  20.    tempX = event.clientX + document.documentElement.scrollLeft;
  21.    tempY = event.clientY + document.documentElement.scrollTop;
  22.    return true;
  23. }
  24.  
  25.  
  26. function funcshowdiv(divname, moveYN)
  27. {    
  28.  
  29. if(IE) {getMouseXY();}
  30.  
  31.  
  32. //alert('x: ' + tempX + ' y: ' + tempY);
  33.  
  34. if (tempX < 0){tempX = 0;}
  35. if (tempY < 0){tempY = 0;} 
  36. tempX = tempX - 10;
  37. tempY = tempY - 10;
  38.  
  39.  
  40.     if(IE){
  41.         var obj;
  42.         obj = eval('document.all.' + divname)
  43.         obj.style.display= ''; 
  44.         if (moveYN)
  45.         {
  46.             obj.style.top = tempY + 'px';
  47.             obj.style.left = tempX + 'px';
  48.         }
  49.     } else {
  50.         if(document.getElementById(divname).style.display!= ''){ 
  51.         document.getElementById(divname).style.display= ''; 
  52.         document.getElementById(divname).style.left= tempX + 'px';
  53.         document.getElementById(divname).style.top= tempY + 'px';
  54.     }
  55.     }   
  56.  
  57.  
  58. }
  59.  
  60.  
  61.  
  62. function funchidediv(divname, moveYN)
  63. {
  64.     if(document.layers) 
  65.     { // browser="NN4"; 
  66.     document.layers[divname].display= 'none'; 
  67.     } 
  68.     if(document.all) { // browser="IE"; 
  69.     var obj;
  70.     obj = eval('document.all.' + divname)
  71.     obj.style.display= 'none'; 
  72.  
  73.     } 
  74.     if(!document.all && document.getElementById){ // browser="NN6+ or IE5+ if you're willing to dump the !document.all stuff"; 
  75.     document.getElementById(divname).style.display= 'none'; 
  76.     }   
  77.  
  78. }
  79.  
Feb 7 '07 #1
0 911

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: bsanderson | last post by:
I am trying to build the same text link mouseover as yahoo has on each news item. when you hover over the link, a small box pops up and displays a photo wtih text. I can get the box to pop up,...
4
by: Just Me | last post by:
I want to make a small window popup when the mouse hovers. I've looked in the Help but can't find any info (probably can't think of a good keyword) Are ToolTips control used for that? Any...
1
by: mgalloway | last post by:
I got my problem from yesterday fixed. Looks like when you mouseover a link it will now bring up a preview of the article. My problem is now this, in IE the preview stays put and you can move your...
1
by: Bart Lateur | last post by:
I'd like to replace the text content of a subdiv by "...", except when the mouse is hovering either above it, or above another subdiv of the same parent. Something like: <div class="parent">...
4
by: alice | last post by:
I'm trying to get sounds to play on image mouseovers using dreamweaver 8, and I found out that the code it generates to do this only works for IE. Is there a way to do this so that it will work...
5
by: ramadeviirrigireddy | last post by:
Hi All, I'm new to this group. I'm working on Java/J2ee. In my project i have one bricklet with header it will have some default color.But when mouseovers on this header i need to change the...
5
by: kimiraikkonen | last post by:
Hi, I couldn't find a necessary class which shows when mouse hovers on a link in Webbrowser control. Think of there's a status bar(text), when mouse comes on a link, the URL must be shown in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.