[Project_owners] showPopup

Michael Johnston special.michael at gmail.com
Sun Jun 12 21:35:18 EDT 2005


tried that, 
boxObject is undefined.

presulmably this is because it is an html element and not a XUL element

mike

On 6/12/05, Michael Vincent van Rantwijk
<mv_van_rantwijk at spamfreeyahoo.com> wrote:
> Michael Johnston wrote:
> > i'm having problems  with getting my popup's to position themselves
> > where i want them.
> >
> > it always appears in the top left of my screen (screen coordinatets 0,0 )
> >
> > here is my code:
> > ==============================================================
> > function other(){
> >
> >       var popup= document.getElementById("my_popup");
> >
> >       var focus= document.commandDispatcher.focusedElement;
> >
> >       var x= -1; // this.screenX;
> >       var y= -1; // this.screenY;
> >
> >       if(f!= null){
> > //            popup.showPopup(null,x,y,"popup","","");
> >               popup.showPopup(focus,x,y,"popup","","");
> >       }
> > }//function other()
> > ==============================================================
> >
> > focus comes back as a
> >     HTMLInputElement
> >
> > how can i get the popup to appear below the current focused HTMLInputElement?
> >
> >
> > mike
> 
> I think that you should use focus.boxObject.[x/y] as [x/y] coordinates.
> 
> Michael.
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>


More information about the Project_owners mailing list