[Project_owners] Reset focus to hyperlink on XUL dialog

Samuel Saint-Pettersen samji at bigfoot.com
Thu Jan 4 00:47:50 PST 2007


No, but I managed to reference a element directly from an external JS
file before. So it is possible. Anyway, I used tooltips now instead.
But thanks for the suggestion.

On 03/01/07, Didier Ernotte <didier at ernotte.com> wrote:
> Are you sure that the main script and the popup are in the same namespace
> (same document) ?  I'm not sure that you can access object of a different
> window from a script in a window.
>
> Samuel Saint-Pettersen <samji at bigfoot.com> wrote:
>  Hello everyone,
>
> I am having problems with my chromeless pop up window (i.e. no titlebar)
> to reset focus to the hyperlink that called it.
>
> I have this code:
>
>
>
> var popupTip;
> function showTip()
> {
> popupTip = window.open
> ('tip.xml','popuptip','chrome,titlebar=no,height=50,width=300,centerscreen');
> document.getElementById("tip1").focus();
> }
> function closeTip()
> {
>  popupTip.close();
> }
>
>
>
> As you can see I tried using "document.getElementById.." to regain focus
> to the link. But for some reason this does not work.
>
>
>
>
> onmouseout="javascript:closeTip();"
> style="text-decoration: none; border-bottom: dotted 1px;">
> vB code
>
>
>
> I have given my link an ID, so the above theoretically should work, but
> it does not.
>
> Can anyone suggest an alternative method for regaining focus to the link
> or highlight any mistakes I may have made which prevents my code
> working. Thanks in advance.
>
>
> Samuel.
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
>
>


More information about the Project_owners mailing list