Morgan,
Would this be correct implimentation?

function doLogin(x,y)
    {
    var posx = 0;
    var posy = 0;
    if (!e) var e = window.event;
    if (e.pageX || e.pageY)
        {
        posx = e.pageX;
        posy = e.pageY;
        }
    else if (e.clientX || e.clientY)
    {
        posx = e.clientX + document.body.scrollLeft
        + document.documentElement.scrollLeft;
        posy = e.clientY + document.body.scrollTop
        + document.documentElement.scrollTop;
    }
    ColdFusion.Window.create('loginwindow','Members Only Area:
Login','/industry/includes/member-login.cfm',{modal:true,height:160,width:300,
x:x+0,y:y+50});
}

On Fri, Mar 6, 2009 at 4:10 PM, morgan l <greyk...@gmail.com> wrote:

>
> This is the js I am currently using, courtesy of quirksmode.com:
> var posx = 0;
> var posy = 0;
> if (!e) var e = window.event;
> if (e.pageX || e.pageY) {
> posx = e.pageX;
> posy = e.pageY;
> }
> else if (e.clientX || e.clientY) {
> posx = e.clientX + document.body.scrollLeft
> + document.documentElement.scrollLeft;
> posy = e.clientY + document.body.scrollTop
> + document.documentElement.scrollTop;
> }
> // posx and posy contain the mouse position relative to the document
> // Do something with this information
>
> On Fri, Mar 6, 2009 at 2:58 PM, Milburn, Steve <
> steven.milb...@acps.k12.md.us> wrote:
>
> >
> > I'm pretty sure that event.pageX and event.pageY are not supported in
> > Internet Explorer.  You may have to look at other options such as
> > event.clientX and event.clientY.
> >
> > Perhaps somebody else can shed more light on this, but I tried using the
> > same code you have and could not get it to work correctly in IE.  After
> some
> > research I found out about IE's lack of support for event.pageX and
> > event.pageY
> >
> > Steve
> >
> > ________________________________________
> > From: Joel Polsky [polskystud...@gmail.com]
> > Sent: Friday, March 06, 2009 3:32 PM
> > To: cf-talk
> > Subject: ColdFusion.Window.create problems..
> >
> > Hi,
> > I'm trying implement the sample on this page, which controls where a
> > cfwindow appears based on the x/y click .
> >
> >
> http://www.coldfusionjedi.com/index.cfm/2007/11/29/ColdFusion-8-and-AjaxBased-Login
> >
> > Here's where my latest code:
> > <script language="javascript">
> > function doLogin(x,y) {
> >   ColdFusion.Window.create('loginwindow','Members Only Area:
> >
> >
> Login','/industry/includes/member-login.cfm',{modal:true,height:160,width:300,
> > x:x+0,y:y+50});
> > }
> > </script>
> > <a href="#" onclick="javaScript:doLogin(event.pageX,event.pageY);return
> > false;" class="subcatlink">MEMBER LOGIN</a>
> >
> > It seems to work in FF, but NOT in IE7.
> >
> > Thanks,
> > Joel
> >
> >
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320189
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to