R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
Relative Positioning of WedJet
Last Post 01 Jan 1900 05:00 AM by . 25 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Page 2 of 2 << < 12
Author Messages Informative
VarunCUser is Offline
Basic Member
Basic Member
Posts:131

--
29 May 2007 05:56 AM  
I must add to it, that tempX and tempY variables used in DoGetPos() function were to be declared outside the function scope :-) and not within.
jhbeachUser is Offline
New Member
New Member
Posts:16

--
08 Jan 2008 02:20 AM  
Thanks for Wedjet! (And your additions Paul) I'm creating a member directory where people get to look up each other's details and the box is popping up nicely, near the name of the person clicked.

It's a little bit erratic, though. Have to sort out what's the best way to get mouse position, across browsers. Also, the box is positioning differently depending on content. Some methods seem to work better than others. Still learning various javascript properties for that, although screenX/screenY seem to be working best for me. I've seen some posts elsewhere that recommend detecting browser first, then use different functions accordingly. It's not as clean as I'd like. Will do more testing.

One thing I just noticed: I Can't pick up the box and move it when using Firefox. Thought I'd inquire here before snooping around on the internet to see if there's a way to make that doable. Any hints?
contactdpUser is Offline
Basic Member
Basic Member
Posts:475

--
08 Jan 2008 03:05 PM  
Do you have firebug installed.

If not can you install it and see if there are any javascript errors?

I think that is the best way to debug your script.

Thanks,
Durga Prasad(DP) | Senior Web Engineer<br>R2integrated
jhbeachUser is Offline
New Member
New Member
Posts:16

--
27 Feb 2008 05:23 AM  
I had difficulty getting my wedjet to show up where the mouse click occurred. Wasn't taking the document scroll into account. With a little help from Firebug (Thank you very much) and this article, I altered mine to the code below:

http://javascript.about.com/library/blmousepos.htm


var tempX = 0;
var tempY = 0;
function DoGetPos(event){
tempX = mouseX(event);
tempY = mouseY(event);
}

function mouseX(evt) {
if (evt.pageX) return evt.pageX;
else if (evt.clientX)
return evt.clientX + (document.documentElement.scrollLeft ?
document.documentElement.scrollLeft :
document.body.scrollLeft);
else return null;
}

function mouseY(evt) {
if (evt.pageY) return evt.pageY;
else if (evt.clientY)
return evt.clientY + (document.documentElement.scrollTop ?
document.documentElement.scrollTop :
document.body.scrollTop);
else return null;
}
contactdpUser is Offline
Basic Member
Basic Member
Posts:475

--
27 Feb 2008 10:14 PM  
awesome... let us know how that worked.

Thanks,
DP
Durga Prasad(DP) | Senior Web Engineer<br>R2integrated
mfncUser is Offline
New Member
New Member
Posts:26

--
05 Dec 2008 09:43 PM  
I have this setup following the posts above and it works great except for two things.

In Firefox, the module pops up at the cursor location every time, however, in IE, if I close the module (using closefloating) the coordinates of the close button are retained and subsequently each time the window is opened again it opens at the position where the module was closed. It seems that the X and Y values are not reset using mousemove after the initial window has been closed. (As mentioned, this is not an issue in FF)

The second issue is that in FF, you can't drag the popup around, but can in IE.

TIA.

-mike
You are not authorized to post a reply.
Page 2 of 2 << < 12


Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share