User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,555 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,473 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1261 | Replies: 3
Reply
Join Date: Oct 2007
Posts: 2
Reputation: tanuagrawall is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tanuagrawall tanuagrawall is offline Offline
Newbie Poster

Getting problem in IE.

  #1  
Oct 19th, 2007
Hi,

I am trying to implement mouse over popUp in my application, that is working fine in Mozilla but not working in IE.
In IE its position is not coming proper and I am not able to shift it.
To set position of popUp I am using following code:

var offX= -180; // how far from mouse to show tip
var offY= 12;

var mouseX, mouseY;
function trackMouse(evt) {
standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
if (tipOn) positionTip(evt);
}

function positionTip(evt) {
if (!tipFollowMouse) {
mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
}
// tooltip width and height
var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
// document area in view (subtract scrollbar width for ns)
var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;
var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;
// check mouse position against tip and window dimensions
// and position the tooltip
if ((mouseX+offX+tpWd)>winWd)
tipcss.left = mouseX-(tpWd+offX)+"px";
else tipcss.left = mouseX+offX+"px";
if ((mouseY+offY+tpHt)>winHt)
tipcss.top = winHt-(tpHt+offY)+"px";
else tipcss.top = mouseY+offY+"px";
if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

In popUp there is an init method which is loaded on body using <body onLoad=""> tag.
Tanu
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 2,604
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 119
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Getting problem in IE.

  #2  
Oct 21st, 2007
This is an area where there is much incompatibility.

The values pageX and pageY are part of the Mozilla set of properties, not the W3C standard DOM properties. IE doesn't know them.

Fortunately for me (I hate those popups), but unfortunately for everyone else, there is no agreement between IE and Mozilla here. I don't understand why everyone loves these maddening popup devices. They are NOT dyslexic-accessible.

The W3C standard DOM reports the mouse locations with clientX and clientY. The problem is that these do not take document scrolling into account, but just use the browser window location.
Last edited by MidiMagic : Oct 21st, 2007 at 10:12 pm.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Oct 2007
Posts: 2
Reputation: tanuagrawall is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tanuagrawall tanuagrawall is offline Offline
Newbie Poster

Re: Getting problem in IE.

  #3  
Oct 23rd, 2007
Hi,

I am still stucked with the same problem of different responses in IE and mozilla.
I am trying to popUp a Calender on click and that is working fine in mozilla but in IE that is getting transparent.. like Dropdown boxes from the background are coming over the calendar.

I think I need to set z-index for this.. but I am not able to do.
Please help.. if anybody can.
Thanks.
Tanu
Reply With Quote  
Join Date: Jan 2007
Posts: 2,604
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 119
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Getting problem in IE.

  #4  
Oct 25th, 2007
The Z index is also not totally implemented yet in a universal way that works on all browsers.

You need to either open an entirely new window (taking focus away from the stuff on the existing window) or make sure where you open the popup has no links under it.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC