Jump to content

Popup a message out of a hidden iframe


drisate

Recommended Posts

Hey guys i am creating a Greasemonkey script that adds an ajax chat to a website. Greasemonkey is an addon for firefox that lets you modify the html code of websites before they are showed to the user.

 

I am in the process of creating a wizz feature that will allow you to send a message to a member and where ever he is on the web his gona receive it. The way it works right now is there's a hidden iframe in every page load and when the player has a message it popups a small window

 

It's working great but the popup is always instantly blocked because firefox has a popup bloker integrated and because it can popup on random websites they don't allow it and there for never gets the message ...

 

Everything else i tryed was blocked by the fact that it opens in the iframe that is invisible

 

I even tryed doing it the old fashon way with an alert() but same thing you don't see it because it's in the hidden frame

 

I am out of ideas ...

Link to comment
Share on other sites

A hidden iFrame will not allow you to accomplish what you want, however, if it is a visible iframe at the top of the page, you can write the html to display a link to open the box, but that is the best I can think of.  Popup blockers are very good at preventing unsolicited popups because there ultimately is only one way to do it--referencing the Document Object Model.  It would be less disruptive to provide a link at the top of the page, and you can even make it a blinking graphic if that helps.  Most users (especially admins) are more vigilante that you'd expect.

Link to comment
Share on other sites

It's quite likely the browser is seeing this an XSS attack. You may be able to get away with using the "parent" property to reference a function within the parent document though, opening the window there. Though you'll still see the usual pop-up toolbar asking whether to allow it or not.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.