Re: OpenWindow.document.write problem



On Feb 9, 7:38 pm, kamal <kamaljeet.lotus...@xxxxxxxxx> wrote:
i am facing a strange problem. please help me out with this.

the following code is working perfectly fine in Mozilla Firefox but in
Internet Explorer it is giving an error in the first
OpenWindow.document.write line itself.

function popup_msg_to_all_users() {
var str = "self.close();";
OpenWindow=window.open("hdfkhgkdfhgdfjkg", "newwin",

What URL is "hdfkhgkdfhgdfjkg" by your opinion? If it's really what
you are having in your code then such cheat codes are not allowed
anymore in IE6 with security fix and IE7. They are treated as an
attempt to escape from zone security rules. For a while you may use
"about:blank" for URL instead but this will be sized as well with new
fixes installed. So I suggest to everyone to start switching to the
only working old schema:

function popup_msg_IE() {
if (window.open instanceof Object) {
// window.open method is maskoned
// by popup blocking plugin
// your alt actions
}
else {
window.open('real_URL.html','popup',params);
}
}

where real_URL.html is a real page within the same domain.

That naturally means that one cannot open popup and interact with it
right away. One must open popup and then either check the
interactivity via setTimeout calls or via event handlers.

As soon as the interactivity confirmed one may go with the stage 2
(write to popup, call its methods and property etc.)

It is not of course a plain vanilla dumpster as was initially intended
but it has one huge benefit: it (still) works for modern browsers.

On the long run window.open and popup are extinguishing tools in the
Web. While for intranet solutions with custom security settings they
remain usable, for open WWW their usability is getting and nearly
became negligible because of numerous secury and ads protection
features.
This way for a fresh project it is suggested to forget window.open as
if it did not exist at all: rather than keep discovering that your
solution is not workable here or there.
.



Relevant Pages

  • Re: win xp firewall
    ... Trust me a friend of mine and I tested it. ... Closing popup after popup would, IMO, qualify since ... I also never referred to it in particular as a 'security ... > The firewall is not ment to block services that are already on. ...
    (comp.security.firewalls)
  • [NEWS] Firefox Popup Blocker Allows Reading Arbitrary Local Files
    ... Get your security news from a reliable source. ... Firefox Popup Blocker Allows Reading Arbitrary Local Files ... There is an interesting vulnerability in the default behavior of Firefox ... allows the attacker to read arbitrary user-accessible files on the ...
    (Securiteam)
  • Re: win xp firewall
    ... Trust me a friend of mine and I tested it. ... Closing popup after popup would, IMO, qualify since ... I also never referred to it in particular as a 'security ... > trust the XP firewall... ...
    (comp.security.firewalls)
  • Re: How to get rid of ie6 ACTIVEX popup?!
    ... security hole becuase you really can't turn it off. ... >> Sounds like the popup is from the web site you are visiting. ... > to allow ActiveX. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)