Jquery Get Iframe Content

I'm having trouble reading the contents of an iframe with jQuery. with no one being able to click on it or search from it. Use the iFrame's jQuery to measure the height of your iframe's body as early as possible (onDOMReady) and then set the URL hash to that height. JavaScript Interaction between Iframe and Parent. Within the function, this refers to the current element in the set. Fast, light, mobile-friendly and responsive lightbox and modal dialog plugin. How to remove render-blocking javascripts The most common culprit javascript, and a really great example for this is jQuery which is a javascript file that is used on a large percentage of webpages. To set this up you need to configure one of the dimensions of the iFrame to a percentage and tell the library to only update the other dimension. If you click the save button, your code will be saved, and you get an URL you can share with others. Embed an iFrame element (e. I am still unable to get the result i need. Answer: Use the jQuery contents() method. If the height of the iFrame is known at different widths, then this could be handled purely through CSS and media queries. -1, I've been working on this ticket, and tested this in the general case, and it seems to work. We've already talked about how, as developers, iFrames can sometimes be our worst enemies. js (and/or hashchange. var yourChildiFrameControl = innerDoc. jnknklnkl Add to Cart More Info. with no one being able to click on it or search from it. Click here to get an API Key. This sub-page. postMessage if available, otherwise using the document hash (IE6 / 7). Let's try out the following example to understand how it basically. jQuery Ajax Load. getElementById(" childiFrameControlId"); Thus, we can easily Get or Set value using the Control object (yourChildiFrameControl). Finally, the plugin collects the server’s response from the iframe. Complete steps is described in this video regarding How To Access Contents Of An Iframe In Jquery/Javascript If you got any clarification on this, please write it on Comment section. To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. Elegant, responsive, flexible and lightweight modal plugin with jQuery. I am pretty much confused, hope my question makes sense to most. If accordion specific styling is needed, the following CSS class names can be used for overrides or as keys for the classes option:. It is very likely you are using it (find out with our tool if you are). Full width slider In contrast to boxed layout, full width option allows you to set your slider to span the whole width of the browser to make your images stand out. load() function. The default behavior of jQuery Mobile is to reverse the transition that was used to reach a particular page when going back to the previous page. In 1996, the iframe tag was introduced by Internet Explorer; like the object element, it can load or fetch content asynchronously. Set Content: It is used to set the content using jQuery. 4 was released as a security release fixing 6 security issues. For jQuery or Zepto. Usually you would not want to use an iframe, unless you actually need to load external content. Home; photo; Saturday, 8 October 2016. Some of these cookies also help improve your user experience on our websites, assist with navigation and your ability to provide feedback, and assist with our promotional and marketing efforts. Whether it’s a Slider, Carousel, Hero Scene or even a whole Front Page, you will be telling your own stories in no time!. maskIframesOnResize = true (true, false, jQuery Selector string) When enabled, layout will 'mask' iframes on the page when the resizer-bar is 'dragged' to resize a pane. Toggle navigation. In most situations with iframes, this target will open links in the same way that the _parent target. How to remove render-blocking javascripts The most common culprit javascript, and a really great example for this is jQuery which is a javascript file that is used on a large percentage of webpages. The draggable widget uses the jQuery UI CSS framework to style its look and feel. You can get a reference to an iframe using getElementById. Weddings by DWTC offers a range of wedding planner services to create your dream wedding. How to Pull Content via jQuery from Another Web Site (Cross Domain) — And do it in SharePoint Too! March 21, 2013 I recently ran into a situation where I wanted to pull some content from another web site, however, due to a configuration constraint, I was unable to to this in a normal fashion. on( "load", function() { }) will run once the entire page (images or iframes), not just the DOM, is ready. Here is the task to insert HTML content into an iFrame using jQuery. Iframes are embedded inside web pages. js is a JavaScript library that will make your content look like a real book or magazine using all the advantages of HTML5. Show loading image while Page is loading using jQuery. i have made some changes using jquery on button click but i want to do that automaticaly after the iframe i loaded. jQuery - jQuery. This property can be used in the host window to access the Document object that belongs to a frame or iframe element. Bug tracker Roadmap (vote for features) About Docs Service status. An iframe pretty much acts like a mini web browser within a web browser. console (e. Enjoyment Thoughts to your Most desirable Guy’s Spiel The most beneficial man’verts address is usually one of the greatest / contentious / most frightening moment’s of some sort of wedding… in case you’lso are the best quality guy that is. Hi everyone, I'm very new to jQuery and quite rusty with my web design in general. 49KB gzipped). Getting started with Modals in Bootstrap 3, setting up the needed files, set up a modal, change size and position of modals and put one modal inside another. Features:-With this jQuery plugin, you get two different types of printing mode which are easy to use and adds a lot to your website. Automagically resizing iFrame. It's done with an HTML iframe tag. Show JQuery Modal Content from ifram On The Parent Window Dec 07, 2011 10:50 AM | matelin | LINK I have a page and inside this an iframe and inside this iframe i have a hidden div,what i want is a jquery modal capable on. HTML documents represent a media-independent description of interactive content. It’s much easier to control overflowed divs than it is iframes, and the scrolling + blank content issues are working all the way back to iOS 4, where previously I wasn’t even able to get the 2 finger scrolling to work (in iframes). Visit and check out intertior, exterior, features and car specifications. May your coming year be filled with magic and dreams and good madness. height() will always return the content height, regardless of the value of the CSS box-sizing property. The best jQuery modal popup plugin … I have made. For now we'll stick to iframes. Embed an iFrame element (e. SharePoint pages that host other pages from the same SharePoint site in an IFRAME are not affected. Show JQuery Modal Content from ifram On The Parent Window Dec 07, 2011 10:50 AM | matelin | LINK I have a page and inside this an iframe and inside this iframe i have a hidden div,what i want is a jquery modal capable on. When padding is added, we apply a few style rules to negate the top margin for the first heading or paragraph in the popup and do the same for the last element's bottom margin. Apex Apartments offers Studio - 1 bedroom units in starting at $1025. To deliver faster load times, better battery life, and stronger security, Safari is optimized for HTML5, and will load this content whenever it is available. To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. name and document. Iframe generator – Set the URL to be accessed, the dimmensions and other attributes to get the iframe HTML code. This property can be used in the host window to access the Document object that belongs to a frame or iframe element. Of course, it also can’t do much of value: you might be able to get away with a full sandbox for some static content, but most of the time you’ll want to loosen things up a bit. On this page, a document in an iframe uses JavaScript to interact with its parent document. However, you can as well interact with cross-domain iframes if you have control over them. Only then, it populates the textarea that gets POSTed to the server. For a more complete solution that keeps the iframe size to the content. I am using an iframe in my page to submit a form to so that it can upload a file - since you can't do this through the jquery ajax function. This technique is used often for displaying a video, movie file, picture, or form when a user clicks on an element in a web page. jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Para algunos sitios es de extrema importancia contar con un medidor y mas aún con respecto a otros servicios o paginas web, Amazon ofrece un Ranking llamado Alexa y ofrece un servicio en base a XML y a travez de una ruta:. Whereas here using jquery change event for content editable. Iframely solves the ever-growing long-tail challenge of rich media embeds by taking care of numerous publishers and their differences. A simple demonstration on how to stop caching in jQuery with either jQuery or javascript. The Month in WordPress: October 2019. and get tips & solutions from a community of 434,778 IT. Hi, I have an iframe on a page on the same domain. It goes something like this:. For now we'll stick to iframes. firebug)?. Issue: In iframes, its not possible to get the jQuery Selector by WebCompanion or the css selector Tool. Use the iFrame’s jQuery to measure the height of your iframe’s body as early as possible (onDOMReady) and then set the URL hash to that height. Then, create a parent-page. In most situations with iframes, this target will open links in the same way that the _parent target. I then added my code in the text file and then attached my text file to the content editor webpart after uploading it to the Site Assests folder. contents() method: It returns all the direct children, including text and comment nodes for the selected element. To do so, we can use the jQuery contents() method. Without the tabs all the regions display fine, with the tabs the iframes come up blank, if I reload the frame the content is displayed. This plugin can get contents of iframe and set height of iframe automatically. suoWebApplication1/WebApplication1/About. Magnific Popup does not - feel free to use relative units like EM's or resize lightbox with help of CSS media queries. $('#iframe'). An example of iframe @MDN. It is very lightweight, you can produce the effect only with jQuery and ResponsiveIFrames. I try to fetch the html content of the iframe, however, always getting null as a return. To javascript, iFrames are typically black boxes. Normally the function returns all child nodes from the matched elements, but in case of an iframe you get the whole document that's loaded into the iframe. The ui-content class can be added to the popup to add the standard 15px of padding. Features include vertical and/or horizontal scrollbar (s), adjustable scrolling momentum, mouse-wheel (via jQuery mousewheel plugin ), keyboard and touch support, ready-to-use themes and customization via CSS, RTL direction support, option parameters for full control of scrollbar functionality,. For instance -webkit-or -moz-. As it’s easy to create an image from a canvas. It returns the same value as. I am using an iframe in my page to submit a form to so that it can upload a file - since you can't do this through the jquery ajax function. As of jQuery 1. How to Pull Content via jQuery from Another Web Site (Cross Domain) — And do it in SharePoint Too! March 21, 2013 I recently ran into a situation where I wanted to pull some content from another web site, however, due to a configuration constraint, I was unable to to this in a normal fashion. "Accsss is denied" when using iframe. We just need to apply code on the iframe load event, so that content is loaded and height can be get at that time. To do so, we can use the jQuery contents() method. It is the child that I'm having shows undefined. jQuery Ajax GET and POST Requests. If not, you will need to load the bootstrap. Animation effects added with CSS3 transitions. There is no any “auto-detection” of type based on URL, so you should define it manually. For a complete selector reference, visit the Selectors documentation on api. For example, if you IFRAME a Bing Map, a page hosted on Windows Azure, or some other hosting service. It is very lightweight, you can produce the effect only with jQuery and ResponsiveIFrames. Home; photo; Saturday, 8 October 2016. html page contains a div#message element, which we will try to get it later in jQuery code. Here is the task to insert HTML content into an iFrame using jQuery. The trick to embedding content is to find content that can be embedded in your site, formatted by you, customized with your own HTML, and integrated into your site in a way. 0 build four days ago. We can access them using properties: iframe. ATENTIE!. Complete steps is described in this video regarding How To Access Contents Of An Iframe In Jquery/Javascript If you got any clarification on this, please write it on Comment section. This video explains how you can use jQuery to get the content of an iframe located on the same server. get the id of the iframe that my content loaded in. Whether it’s a Slider, Carousel, Hero Scene or even a whole Front Page, you will be telling your own stories in no time!. Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Issue: In iframes, its not possible to get the jQuery Selector by WebCompanion or the css selector Tool. The iFrame loads another page. The contentWindow property returns the Window object of an HTMLIFrameElement. However, I don't know if this would break an expectation that when $. How does the plugin work? When a browser-native window. We thought of a javascript which should run after each content change of iframe and we will be checking the content present in the corresponding iframe for loginpage contents, if it contains the loginpage we will be setting the window location to login page. So, we got the iFrame Document (innerDoc). CSS JQUERY XML MORE Get Element in Iframe. outerHTML is a JavaScript property that can be used to get the string with a HTML element, including its tag, attributes and child elements, also it can replace a HTML tag (including its content) with other HTML content. It provides swipe, mouse and keyboard navigation to the image gallery html, and extends it with different transition effects, fullscreen functionality, and on-demand content loading. This sub-page. To resize iframe height according to content, we can use javascript or jQuery. This article describes how to resize the height of an iframe automatically — whenever the content of the web page being published within the iframe changes. It looks like there's dynamic creation of an IFRAME and injection of content into that frame. Here's how I used postMessage to get the height and width of a document in an iFrame. By using the standard Document Object Model (DOM), they are able to read details of the web pages the browser visits, make changes to them and pass information to their parent extension. This sub-page. hi, so i give up on thumbshots as an answer. Popular LightBox and Thickbox, JavaScript widgets to show content in modal windows, are outdated at the moment. There are many ways to access iframe content. Of course, it also can’t do much of value: you might be able to get away with a full sandbox for some static content, but most of the time you’ll want to loosen things up a bit. I try to fetch the html content of the iframe, however, always getting null as a return. Access Iframe Content in jQuery JavaScript : We can access iframe content using jQuery, javascript. $('#iframe'). contentWindow to get the window inside the. As you probably know, generating files is not possible with JavaScript alone. Access IFrame content using Jquery This is really helpful post for so many people who are using frames in their pages and want to access content inside it from main[parent] page. The jQuery code and the iFrame page reside on the same domain. If called on a set of elements, parent returns a set of their unique direct parent elements. the HTML source code of the webpage that has an iframe will look like the below code. It provides swipe, mouse and keyboard navigation to the image gallery html, and extends it with different transition effects, fullscreen functionality, and on-demand content loading. Bradshaw Responsively keep same and cross domain iFrames sized to their content with support for window/content resizing, multiple and nested iFrames. סטודיו לעיצוב גרפי, פרינט, דיגיטל, תלת מימד והדמיות, אינטרנט ואינטראקטיב, מיתוג ושפה חזותית. With Simple PHP Proxy, your JavaScript can access content in remote webpages, without cross-domain security limitations, even if it’s not available in JSONP format. Note: I could not access the elements borderWidth attribute. jQuery Ajax GET and POST Requests. ajax() API to submit the data. Monday, July 30, 2012 jQuery jQuery Codes jQuery Tips Scroll Height Height () method in jQuery returns height of the element but assume an element which has "overflow:auto" property set (you will find scroll bars) and its content are going beyond to the initially defined height. Iframe shortcode is the replacement of the iframe html tag and accepts the same params as iframe html tag does. Popular LightBox and Thickbox, JavaScript widgets to show content in modal windows, are outdated at the moment. It takes the url from loadUrl. 's which display content from different domains have security measures in place to prevent all sorts of stuff. jQuery Modal. The solution I found is based on an IFrame and a JavaScript-Function: Add a print IFrame to every page (you should add it to your central layout file). You have an iframe on the page showing some document, and you want to find an element inside the iframe using JQuery. I have a page that has an iFrame with an id. WordPress removes iframe html tags because of security reasons. You can use this Window object to access the iframe's document and its internal DOM. contents() method can also be used to get the content document of an iframe, if the iframe is on the same domain as the main page. jQuery Get Content Using html() jQuery html() set the inner HTML content of the HTML element with tag names you can as an argument. jQuery events. This technique is used often for displaying a video, movie file, picture, or form when a user clicks on an element in a web page. How to Refresh DIV Content Without Reloading Page using jQuery? Last Updated on April 30th, 2017 by App Shah 31 comments In my previous example I’ve explained you, how to refresh data on JSP page coming from Spring MVC Controller and refresh using JQuery. html with the following content. PrintArea jQuery plugin designed to print specified areas of a web page. It's that easy because of jQuery's contents() function. jQuery Plugin To Scale An Element According Window Size - fitToParent. Filtering IFrame Content using jQuery. Note that both parent and child need to include the jQuery postMessage javascript, and for communication to be enabled in browsers that don't support window. Load content on click into window. A foundation for ambitious web applications. AngularJS is what HTML would have been, had it been designed for building web-apps. 6m developers to have your questions answered on Automatic width and height on window. This code selects an element with an ID of "myDivId". With Simple PHP Proxy, your JavaScript can access content in remote webpages, without cross-domain security limitations, even if it’s not available in JSONP format. Sometimes we need to create inline iframe with content generate from jQuery/Javascript. There are some great alternatives - colorbox, jQueryUI Dialog, fancybox, DOM window, shadowbox, but we highly recommend you to try VisualLighbox - jQuery Lightbox. Features:-With this jQuery plugin, you get two different types of printing mode which are easy to use and adds a lot to your website. Simply triggering the browser's print dialog when pressing the button didn't work, because the whole page gets printed and the content of the dialog is not visible at all. In this tutorial you will learn how to load data from server using jQuery. Get XPath of Selected Element Of IFrame Using Jquery If you want to get element`s XPath of selected element of Iframe and also add highlight css in element on mouseover , out and click event. IFrames are used to insert content from another source. There is no any “auto-detection” of type based on URL, so you should define it manually. An inner frame that works much like the HTML element. If you're trying to load content from another page into your page than AJAX is the best way to go. Click "Show / hide content" and the Iframe should tell the parent frame to resize using window. 49KB gzipped). JQuery DOM Traversing Methods. 8, this may require retrieving the CSS height plus box-sizing property and then subtracting any potential border and padding on each element when the element has box-sizing: border-box. I'm not sure about jQuery specifically, but I know HTML 5 came with an exciting new element for this. Definition and Usage. Auto-resize Iframe when Content Size Changes. For example, if you IFRAME a Bing Map, a page hosted on Windows Azure, or some other hosting service. ¿Cuál es la forma correcta de insertar un comentario? 5. With the Bootstrap integration, you can put the content of the IFrame inside modal to make it even more interactive and entertaining. Introduction Hi All, I hope you are fine. How to set iFrame height/width to fit browser window? 4 years ago. You can get iframe contents using contents function and then you an use find method to fine an element inside iframe as shown in the following example code. This video explains how you can use jQuery to get the content of an iframe located on the same server. Definition and Usage. If the height of the iFrame is known at different widths, then this could be handled purely through CSS and media queries. I thought this was possible with jquery. By David Walsh on July 20, 2012. Responsive IFrames Plugin can be used to create a Responsive IFrame which can change its width or height as users interact with dynamic content and avoid scrollbars. lindasecacheadas. You need to set the option 'lazy' to true. Usually you would not want to use an iframe, unless you actually need to load external content. It looks like there's dynamic creation of an IFRAME and injection of content into that frame. From the client side, all we need to worry about is sending the right Content Type and Request body (the content we send along like the form data). Set iFrame Height To Fit Its Content - jQuery frameLoader. This post is not extensive explanation of how to manage and work with iframes using jQuery. Set Content: It is used to set the content using jQuery. When jquery is loaded and run within an iframe, executing animate() on content within the iframe causes the parent document (the page that contains the iframe) to scroll so that the iframe is positioned at the top of the window. Update content inside lightbox without worrying about how it'll resize and center. From the client side, all we need to worry about is sending the right Content Type and Request body (the content we send along like the form data). I am using this line of code to get the id from the control in the par. This post expands the functionality by looking at how to put a loading image as a placeholder where the new content will. Some of you might have already tried this, this article is for the one who never tried the same. Make any type of content scrollable, not just images. An tag hosts a separate embedded window, with its own separate document and window objects. To obtain a reference to a Kendo UI Window instance from within its non-iframe content, use DOM traversal. jQuery is a Javascript framework which can simplify coding Javascript for a website and removes a lot of cross browser compatibility issues. In this tutorial you will learn how to load data from server using jQuery. I'm having trouble reading the contents of an iframe with jQuery. The default URL for an empty frame is about:blank, which leads to the prompt. jQuery HOME jQuery Intro jQuery Get Started jQuery method can also access the HTML of an iframe, if it is in the same domain. html(): It is used to set or return the innerHTML content of the selected element. jQuery Tutorials: AJAX Load Content No Page Refresh Auto Refresh Div Content Using jQuery and AJAX Webslesson 102,164 views. It’s much easier to control overflowed divs than it is iframes, and the scrolling + blank content issues are working all the way back to iOS 4, where previously I wasn’t even able to get the 2 finger scrolling to work (in iframes). It can be very frustrating, for example, if you just want to do something normal and white-hat like adjust the height of the iframe to fit the content inside it. Topic: JavaScript / jQuery Prev|Next. Here's how I used postMessage to get the height and width of a document in an iFrame. As of jQuery 1. There is no any “auto-detection” of type based on URL, so you should define it manually. Using Knowledge Exchange™, store valuable company content, including videos, articles, training materials, and more. The tag specifies a floating inline frame, used to embed external content in a webpage. 1315 in the menu widget, which depends on JQuery 1. How to get contents of iframe? JQuery provides contents() function to fetch contents from iframe. Use the iFrame's jQuery to measure the height of your iframe's body as early as possible (onDOMReady) and then set the URL hash to that height. This article explains and shows how to dynamically create an iframe in your HTML document’s DOM using jQuery and/or JavaScript. I manipulate the source of the iframe from the parent document (yes, all documents are on the same domain), and I see these errors sporadically when the iframe has unloaded and reloaded with new content. JavaScript Interaction between Iframe and Parent. Grid Detail. Show loading image while Page is loading using jQuery. Note that the matched elements (#navigation in the first example) must be preserved in the DOM. The popup will have a 15 pixels padding because of class ui-content and a one pixel border because the framework will add class ui-body-a to the popup. An iframe is a section of a web page where the content of another web page can be published. New option: contentContainer, gives you the possibility to load content into a small area of the popup e. Each Content section of the CMS are pulling in Static blocks. Given a jQuery object that represents a set of DOM elements, the. סטודיו לעיצוב גרפי, פרינט, דיגיטל, תלת מימד והדמיות, אינטרנט ואינטראקטיב, מיתוג ושפה חזותית. contentWindow to get the window inside the. Resizing an Iframe as its content grows While this isn't the best approach to cross-domain Iframe resizing , it is definitely useful for same-domain Iframes. Some of you might have already tried this, this article is for the one who never tried the same. Supports both Bootstrap 3 and Bootstrap 2 frameworks. A workaround is saving the external contents in a file, for example (in PHP): then, get the new file content (string) and parse it to html, for example (in jquery):. Enabling cross-site scripting XSS via an iframe Posted by Jeff at 1:24pm on October 19, 2008. Javascript now allows cross-document communication thanks to the postMessage function. I have the following jquery code and I have inserted it in an html page where I call it inside an iframe in a SharePoint page. The contentDocument property returns the Document object generated by a frame or iframe element. We wanted to release this patch as quickly as possible to squash any bugs you may have experienced when upgrading. Responsive IFrames Plugin can be used to create a Responsive IFrame which can change its width or height as users interact with dynamic content and avoid scrollbars. This solved problems related to dragging an element over an iframe. Script access to a frame's content is subject to the same-origin policy. This article explains and shows how to dynamically create an iframe in your HTML document’s DOM using jQuery and/or JavaScript. So the easiest way is to get the length of returned jQuery object. link Selecting Elements by ID. var win = elementInsideWindow. By medweb on Apr 19, 2012. parent property is a reference to the parent of the current window or subframe. It helps while doing DOM manipulation and makes Ajax requests painless across different browsers and platforms. Provided I tested it on my local machine and they're not actually doing anything (just a mere array filling operation), jQuery's each function takes over 10 times as long as JS native "for" loop. The event listener popup in the Inspector now supports jQuery. jQuery Tutorials: AJAX Load Content No Page Refresh Auto Refresh Div Content Using jQuery and AJAX Webslesson 102,164 views. jQuery makes it easy to filter out the content that we want from the rest of the embedded page using the DOM element collection contents() method. height() will always return the content height, regardless of the value of the CSS box-sizing property. Show JQuery Modal Content from ifram On The Parent Window Dec 07, 2011 10:50 AM | matelin | LINK I have a page and inside this an iframe and inside this iframe i have a hidden div,what i want is a jquery modal capable on. I agree with abiruban. Call us, email us, or simply fill out the form below to hear back from us. How to Dynamically Resize an iFrame at Learning jQuery. This will bring the complete HTML code from iframe. HTML CSS JAVASCRIPT SQL PYTHON PHP BOOTSTRAP HOW TO W3. Tooltipster's content method allows you to edit the content of the tooltip at any time with greater flexibility. Weddings by DWTC offers a range of wedding planner services to create your dream wedding. With this jQuery plugin, you can enjoy all the features and facilities of page printing on a website without spending a single penny. How to Scale iFrame Content in IE, Chrome, Firefox, and Safari on November 5, 2013 Scaling (or zooming) the content of an iFrame can be useful when you are trying to display an object in an area that does not match its original size. iFrame message passing test. Content Types. Passing data and non-GET requests cannot be sent to an iframe as they require a form with a target attribute. How to use it: Include jQuery script and ResponsiveIFrames. JavaScript / Ajax / DHTML Forums on Bytes. Elegant, responsive, flexible and lightweight modal plugin with jQuery. Syntax, get HTML content with outerHTML:. Resize iframe by its content – cross-domain. Print a specific area of the web page - Simple way to print part of a web page or full page content using jQuery. You can use this Window object to access the iframe's document and its internal DOM. In this tutorial you will learn how to load data from server using jQuery. But when I’m putting code back in, I noticed that my jQuery noConflict snippit breaks the dynamicpage. Popular LightBox and Thickbox, JavaScript widgets to show content in modal windows, are outdated at the moment. textContent is doing correct thing to get the text of the element you are targeting. You may use iframe shortcode to embed content from YouTube, Vimeo, Google Maps or from any external page.