iframe

iframe shifts 1 pixel to left on some browser sizes

i have code like, sorry i dont have the exact code now. but its valid. <iframe src="..." borderframe="0" scrolling="no" width=728px" height="90px"></iframe> the target is a html file that contains code for a banner. everything displays well. but when i resize browser or go to maximize. the content is shiftet to the left by 1 pixel. s...

iPhone designmode support

Hi, Anyone knows if Safari on the iPhone and iPod touch supports iFrame in design mode and if so, how I can enable it? I have tried following ways, but none work (but it works on my PC): theIframe.contentWindow.document.body.contentEditable = true; theIframe.contentWindow.document.designMode = 'on'; theIframe.contentDocument.designMo...

How to read DOM of the iframe loaded with a page from another domain?

Is there a way to access the DOM of the document in an iframe from parent doc if the doc in the iframe is on another domain? I can easily access it if both parent and child pages are on the same domain, but I need to be able to do that when they are on different domains. If not, maybe there is some other way to READ the contents of an i...

Visibility of script includes in an IFRAME

For example: script.js: function functionFromScriptJS() { alert('inside functionFromScriptJS'); } iframe.html: <html> <head> <script language="Javascript" src="script.js"></script> </head> <body> <iframe> <body> <script language="JavaScript"> functionFromScriptJS(); </script> </body> </iframe> </body> <h...

set an iframe source without loading new content

Is there any way to set the src attribute of an iframe without the iframe generating an http request? If not, is there a way to format the request headers before the request is sent? edit: I just need the src to match the path of a cookie, but I don't ever want that cookie sent to the server. See my comments on this question. ...

Safari: event bubbling across iframes

If the user does a "onmousedown" inside a iframe, drags outside the iframe and hovers over elements that have a "onmouseover" attached to them - safari does not fire this event. I have a slightly unconventional drag n drop setup. The items that can be "dragged" are inside a iframe. The drop targets are outside the iframe. If the drag st...

Are iframes considered 'bad practice'?

Somewhere along the line I picked up the notion that using iframes is 'bad practice'. Is this true? What are the pros/cons of using them? ...

How do I use frame on ASP.NET page?

How do you correct use frame on a asp.net page, so I have a left frame and a right frame, when I click the links on the page presented in the left frame, it loads the according page in the right frame? On top of this, I need to have a master page on all the right frame's pages. How do I do this? or is there another way to achieve the ...

jquery/javascript: accessing contents of an iframe

I would like to manipulate the html inside an iframe using jquery. I thought I'd be able to do this by setting the context of the jQuery function to be the document of the iframe, something like: $(function(){//document ready $('some selector', frames['nameOfMyIframe'].document).doStuff() }); However this doesn't seem to work. A ...

Access the id from iframe

Hi friends, Here i had build a html page with an iframe. I had an id within the iframe src page. Is it possible to access the id from my current page. Throu javascript. Please help me. ...

Removing scrollbars from Content Editor/Page Viewer Webpart

I am trying to display an HTML page inside another SharePoint webpart page. I used the Out-of-the-box page viewer webpart, but the page viewer webpart displays a disabled scrollbar inside it. I also tried using a content editor webpart with an IFRAME tag in it, but still it didnt't work. This is the code i used in the content editor w...

setting focus to iframe contents.

I have a page with a document.onkeydown event handler, and I'm loading it inside an iframe in another page. I have to click inside the iframe to get the content page to start "listening". is there some way I can use javascript in the outer page to set the focus to the inner page so I don't have to click inside the iframe? EDIT: resspons...

iFrame causes scriptaculous dragging issues in IE7 (full code included)?

When I drag a link that is inside a draggable div over an iframe in IE7, I get very strange results. Try the code below and let me know if you have any suggestions about how to fix this. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html> <head> <!--<sc...

How to prevent IFRAME from redirecting top-level window

Some websites have code to "break out" of IFRAME enclosures, meaning that if a page A is loaded as an IFRAME inside an parent page P some Javascript in A redirects the outer window to A. Typically this Javascript looks something like this: <script type="text/javascript"> if (top.location.href != self.location.href) top.location....

Copying an entire document into an iframe with javascript

It sounds wonky, but this is what I'm trying to do with javascript (this is all triggered by an event handler): Save the contents of a page (preferably the whole document or at least documentElement object) into a variable. Create an iframe and insert it into the body. Replace the document of the iframe with the saved document (so that...

Javascript iPhone Scroll Effect in an iFrame / Javascript Mouse Acceleration

Hey Stackoverflow, I'm trying to recreate the iPhone flick / scroll event in a window using JavaScript. Starting with JQuery, I'm measuring the mouse's acceleration and offset during click - drag - release events using a timer: var MouseY = { init: function(context) { var self = this; self._context = context || wi...

What are the differences between using an iframe and ajax to include the contents of an external page?

I have been reading up on this, and it seems that if you use ajax you can only bring in content that resides on the same domain whereas with an iframe you can bring in content from any domain. Is that the case? What other differences are there? ...

How can I position a div over two iframes where one iframe has external (different domain) content?

I am looking for a way to position a div (it would be a pop-up that would be activated by a user hovering and/or clicking much like lightbox) over an a split iframe where the top iframe is content from my server and the bottom iframe is content from another server. Like this: ---------------------------------------- | ...

Target attribute in IE7

We have some web pages which have two frames, with one frame in the IE 6 search bar (created using the open("path.htm", "_search"); call). The page shown in the frame on the search bar contains buttons, on click of which we update the right frame. On migration to IE 7, both frames open in their own windows, i.e, I now have two windows op...

How to switch master page depending on IFrame

I want to use an IFrame in my ASP.Net MVC application, yet I want to retain the layout when the internal pages are navigated via direct access (Search Engine). How would I switch the master page based on whether the View was in an IFrame, or a top level window? ...