S
Samuel Saint-Pettersen
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:
<!-- begin JS snippet (external JavaScript file) -->
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();
}
<!-- end snippet -->
As you can see I tried using "document.getElementById.." to regain focus
to the link. But for some reason this does not work.
<!-- begin HTML snippet in XUL dialog -->
<html:a id="tip1" onmouseover="javascript:showTip();"
onmouseout="javascript:closeTip();"
style="text-decoration: none; border-bottom: dotted 1px;">
vB code</html:a>
<!-- end snippet -->
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.
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:
<!-- begin JS snippet (external JavaScript file) -->
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();
}
<!-- end snippet -->
As you can see I tried using "document.getElementById.." to regain focus
to the link. But for some reason this does not work.
<!-- begin HTML snippet in XUL dialog -->
<html:a id="tip1" onmouseover="javascript:showTip();"
onmouseout="javascript:closeTip();"
style="text-decoration: none; border-bottom: dotted 1px;">
vB code</html:a>
<!-- end snippet -->
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.