Forum Moderators: open

Message Too Old, No Replies

adding blur or focus

         

bboomer

2:10 am on Jun 6, 2004 (gmt 0)

10+ Year Member



Is there a way to add self.focus or self.blur to the following script - so the window can pop under or up?

<script>
function zxfrthb(url, windowname, windowspecs) {
window.showModelessDialog("javascript:function noerror(){return true;} window.onerror = noerror;function doit(){setTimeout(\"window.open('"+url+"','"+windowname+"', '"+windowspecs+"', true); self.close();\",100);} doit();","","dialogtop=12345; dialogleft=12345; dialogheight:0px; dialogWidth:0px; status:no; help:no");
}
zxfrthb('http://www.mydomain.com/','lefty','width=500,height=400,toolbar=no,menu=no');
</script>

boomer

Rambo Tribble

4:35 am on Jun 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The showModelessDialog(), which is an IE-only feature, is supposed to stay atop all browser windows, regardless of what you do, while allowing the user to interact with other windows.

This and the showModalDialog() are special purpose windows that behave differently than windows opened with the more universal window.open() method. Both are designed as popup windows, and will probably be blocked by some of the popup-blockers out there.

j4mes

8:16 pm on Jun 6, 2004 (gmt 0)

10+ Year Member



Since you are loading an external page, you could also use onload="self.blur()" in the body tag of the popup, which should have the same effect.

Alternatively, you can use windowname.blur() in the popup loading page to control the focusedness (:P) of your popup.

HTH

James.