Click here to Skip to main content
15,905,414 members
Everything / IFrame

IFrame

IFrame

Great Reads

by Sunasara Imdadhusen
Load page in IFRAME based on TreeView node selection without postback.
by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
This tip will help you to communicate with a cross domain Iframe which is added in the form.
by tanweer
A very easy to use jQuery popup window control for websites.
by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Have you ever tried to access the values of Child Page/iFrame inside the Parent Page? If not, try this tip.

Latest Articles

by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Have you ever tried to access the values of Child Page/iFrame inside the Parent Page? If not, try this tip.
by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
This tip will help you to communicate with a cross domain Iframe which is added in the form.
by tanweer
A very easy to use jQuery popup window control for websites.
by Sunasara Imdadhusen
Load page in IFRAME based on TreeView node selection without postback.

All Articles

Sort by Score

IFrame 

29 Sep 2012 by Ed Nutting
Hi there,If you are viewing the email in any decent email client then it will block the use of iFrames unless the suer specifically allows it. Sending HTML emails (especially ones with JavaScript and iFrames) is a very bad idea. 2 reasons: 1) It's unfriendly to users and a common thing for...
25 Oct 2011 by Espen Harlinn
It's IE that limits the number of connections to your server:http://blogs.msdn.com/b/ie/archive/2005/04/11/407189.aspx[^]Best regardsEspen Harlinn
8 Oct 2012 by ujju.1
check this link
28 May 2012 by Sergey Alexandrovich Kryukov
Please see my comment to the question.You can always use Microsoft WebBrowser control. Please start here:http://msdn.microsoft.com/en-us/library/aa752040%28v=vs.85%29[^].Alternatives include Mozilla ActiveX control, please see:http://www.adamlock.com/mozilla/control.htm[^].Another...
19 May 2013 by Zoltán Zörgő
The IFRAME is a html level (client side) element (that you should not use since it is deprecated). Anyway, all iframes refer to some php scripts. That is what you should have known already. Now the lesson: you have to include session_start(); at the beginning of all these php scripts, including...
22 Oct 2013 by bjdestiny
hi, try that in give z-index:-1 in background layer div and give z-index:9 to upper layer div. i think it will solve your this problem.
17 Dec 2013 by Member 10434230
Check this : What's the best way to reload an iframe using JavaScript?[^][Edit member="Tadit"]Link text added to reflect the Article/QA title.[/Edit]
17 Dec 2013 by Nirav Prabtani
function SetPage(url){document.getElementById("myframe").setAttribute("src", url);}My Page1My Page2My Page3My Page4
17 Dec 2013 by Er. Tushar Srivastava
Hi Friend, As per I think, it is a simple javascript which can do it for you. For example (I have not tested it, it may require some debugging)I am using jQuery of this example.$(document).ready(function(){ var url;//You can get this url dynamically from an ajax request or from a...
10 Sep 2015 by F-ES Sitecore
You can't put content inside an iframe, you can only give it a src and the page at that src is loaded inside it. That's just how an iframe works, if you want to put content inside it then use a div instead.
19 Dec 2017 by Richard Deeming
Changing the URL from the client: function changeUrl(){ var iframe = document.getElementById("theElement"); iframe.src = "https://..."; } Changing the URL from the server:
12 Jul 2011 by Nagy Vilmos
The clue is in:I noticed that sometimes it works, but when refreshing the page it's not "liked" anymore and then it does not work.Are you maintaining the state correctly when you refresh the page?
9 Jan 2012 by Jamal Seyedi
I think you should put the ActiveX control to an element and then hide the element.then show the alert.
8 Mar 2012 by NDawg606
I'm very green to webdesign. I understand coding from over a decade ago, but not done it since and it's slowly coming back to me, but it's all different now as well. Sorry it's long but I need a very specific task.I have a weekly webcomic that when I update with a new comic, I want my...
8 Oct 2012 by bbirajdar
You can do this by creating a custom search engine from Googlehttp://www.google.com/cse/[^]http://www.google.com/cse/tools/create_onthefly[^]http://www.google.com/educators/p_cse.html[^]
6 Jan 2013 by Sandeep Mewara
alternative way for iframe in html5AFAIK, there is no alternative of iFrame even in HTML5. Though you can try alternative like loading the content at runtime using XMLHTTPRequest instead of using an iFrame.
8 Jan 2013 by fjdiewornncalwe
It is a dns error. It means that from the server, the http://domain.xxx.aspx you are trying to open in your iframe doesn't resolve. Check the hosts file on your local machine and see if you have an entgry for this url. If you do, then you'll need to use the IP address specified in the hosts file...
17 Aug 2013 by Zoltán Zörgő
Everything depends on where that outside from other drives lies relative to the client browser. What exactly does appear in the html code. The fact that you can reach the pdf on the server does not implies that the client can reach it too - and this involves access rights, protocols, exposed...
17 Dec 2013 by ketan italiya
Thanks for your valuable reply,i do with this but now i got one more problemi got this source from...
17 Dec 2013 by ketan italiya
hey all thanks for your suggestion but i got solution it's very simply,i only use string Url = ev.google_map;iframeid.Attributes["src"] = Server.HtmlDecode(Url);server.htmldecode and got solution,Thanks,
4 Jan 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
First of all, very nicely explained. :)We have some sort of work like this in one of my previous projects and I found a Cross Browser way of handling this using window.postMessage. I have also written a Tip on that.See my Tip - Communication with Cross Domain IFrame - A Cross Browser...
28 Oct 2014 by SRS(The Coder)
You can do it in simple way using jQuery UI library.As displayed in below example :-http://jsfiddle.net/smrutis1984/qar7zf03/5/Hope will be helpful.
8 Jan 2015 by Suvendu Shekhar Giri
Use following as BackgroundCssClass of ModalPopupExtender. .modalBackground { position: absolute; z-index: 100; top: 0px; left: 0px; background-color: #000; filter: alpha(opacity=60); ...
23 Feb 2016 by Kornfeld Eliyahu Peter
That site returns an X-Frame-Options with SAMEORIGIN value...That means that only pages from the same origin (site) can display content in iframe...The X-Frame-Options response header - HTTP | MDN[^]
10 Mar 2016 by aarif moh shaikh
You need not to iframe for it. when you passing QueryString (REFNo) on StaffSalaryPrint.aspx page, Here you can create anchor tag and give href as like StaffSalaryPrint.aspx?REFNo='your ref id'.After that Access querystring on staffsalaryprint page and show data according to RerNo.now...
3 Jun 2016 by Afzaal Ahmad Zeeshan
A very bad practice in my own opinion. An iframe won't make it a mobile application, instead it would just be a web application running in a WebView (for example in Android), showing it to be an application. You can ask your manager to read about Apache Cordova, Xamarin and other platforms such...
1 Jan 2017 by Thomas Daniels
If the back button is part of the page displayed in the iframe, then you should run this on the onClick event:window.history.back();I see that this is in your "What I have tried" list... but I expected this to work and when I tried it, it did.
7 Mar 2017 by F-ES Sitecore
You can't send html that contains an iframe and also the content of the iframe in a single response, you need to split this into two requests. You'll need your original page to render out an iframe whose src element points to a page that only returns the PDF, ie all of your Response.* lines. ...
11 Nov 2017 by Member 13516097
document.onmousedown = disableRightclick; var message = "Right click not allowed !!"; function disableRightclick(evt){ if(evt.button == 2){ alert(message); return false; } }
4 Dec 2017 by Yuriy Loginov
Try this function toShow() { var iframe = document.getElementById('pdf'); iframe.style.display = 'block'; }
28 Nov 2018 by F-ES Sitecore
The src of the iframe is the url to show in the iframe. Views don't have urls you can navigate to so you'll need a controller action that returns your view and you'll have to set the src to the url of the controller action. You could also use the srcdoc attribute rather than src but depending...
9 Mar 2020 by Richard Deeming
In the calling page: myiframe.Attributes["src"] = ResolveUrl("~/FileCS.ashx?documentid=" + HttpUtility.UrlEncode(id) + "&username=" + HttpUtility.UrlEncode(username)); In the handler: string id = context.Request.QueryString["documentid"];...
14 Jul 2020 by Andre Oosthuizen
Change your if statement when creating the frames to a while loop, change the page number with the correct number - while (vbutt
15 Jan 2021 by Richard Deeming
You can't. If you load a page from another site inside an , code running in your page will have no access to it. Imagine what would happen if it did: you visit a random website, which loads your (logged-in) bank site in an , and...
25 Aug 2021 by Richard Deeming
An HTTPS page cannot load active content, including iframes, from an HTTP site. To do so would represent a security risk. Make sure the site you want to embed is served over HTTPS instead. And remember that localhost refers to the local...
8 Mar 2011 by Sunasara Imdadhusen
Load page in IFRAME based on TreeView node selection without postback.
30 Mar 2011 by Sarath Reviuri
I would like to adjust the height of the iframe based on its contents height. I know a option to do that using the Cross Domain Scripts. Is there any other mode to achieve the same with out the cross domain scripts?
30 May 2011 by Jamal Seyedi
I have solved my problem by this : height:expresion( some script )
28 Jun 2011 by MohamedHassanAli
Hello,I am creating a forums like site and i have implemented a (simple) richtext area. I am able to fetch the input at server. But i dont have any idea on how to retrieve this from the server and present this to the user.
28 Jun 2011 by harish85
You could you use javascript to create iframe element using create element you need to invoke the js on some events or your best way your design goes.
28 Jun 2011 by Ramalinga Koushik
Use Javascript to create your Iframe.
3 Jul 2011 by Christian Graus
Looks like you're disabling frames.
3 Jul 2011 by shoab.shah
Hi all,we are intregating some 3rd party services in our site. For this; in our website there is page which has a iframe we are gonna get webpage from other website in that frame.our website implements Ticket based forms authentication.for authorization we use url authorization ie we...
12 Jul 2011 by Maxdd 7
I've used the form from facebook developers like button official page to create code to get a "like" button, but then I press the like button it works for a second but then the "like effect" disappears.I have a test page here:http://apkitchen.voku-online.de/teste.php[^]and the iframe...
21 Jul 2011 by Sameties
Hello,My aim is to authenticate users in two systems at the same time. One is mine. I developed it. Second one is in different server and i don't know how to authenticate my users on it, cookies etc.So i decide to post login page of Second one with auto filling necessary fields.I...
26 Jul 2011 by Jamal Seyedi
try these1) element.ownerdocument2) declare a variable in main page and in iframe page write: parent.variablename = this. now variablename is iframe object.Or use scriptlet but it works just in IE browsers
17 Aug 2011 by Elizabeth.Hamlet
Hello,I have searched online quite a bit about this but still cannot find a solution.I have an ASP.NET web application in an Iframe on a parent website. In IE7/8 only when selecting the back button at any point, it redirects to outside of the parent site, to the link that the iframe is...
30 Aug 2011 by mukti goutam
hi, anybody can help to add a web browser control with asp.net page i created browser and which navigates on url and i can also fill all information and read html but i am unable to see all that means how can i make visible it(browser) on aspx page.i also tried replace that issue by iframe...
30 Aug 2011 by mhamad zarif
check those links :Using the WebBrowser Control in ASP.NET[^]Using the WebBrowser control in .NET[^]
30 Aug 2011 by mukti goutam
i tried but them but they are working only with localhost.
4 Sep 2011 by iamgun10a
Hi.I have a aspx page within iframe on another aspx. DropDownList on the page inside iframe always return selectedindex = 1, on selectedindexchange event, on buttonclick event... I dont know what to do ... Pls help.In JS I set...
5 Sep 2011 by nit_singh
This problem is no way related with the IFrame, this is the problem of binding DropDownList which is getting binded every time whenever the page reload. So put the binding logic in !IsPostBack property.
5 Sep 2011 by Anurag Gandhi
Please check if you are re-setting the value of DropDownList somewhere in your code.IFrame doesnot have any such issue.
6 Sep 2011 by iamgun10a
It was f. mistake of DropDown binding :different texts ,the same values ...
28 Sep 2011 by AditSheth
Hello I cause a problem in window.history.back() in IEi use iframe inside page.So when window.history.back() fire it back from iframe not from page..So what to do in this case?Thanks Adit
29 Sep 2011 by Muralikrishna8811
Hi, upto my knowledge it is not possibleB'coz history is about whole window thing not for part of page.you've to follow some other way to back like redirecting to back from serveror changing iframe src property in code behind fileI hopw you understood What I...
25 Oct 2011 by Trekstuff
Hi all,I have a main parent page with several "widget" iframes. ClientSide JavaScript sets SRC attribute of these iframes so they can load at the same time. The problem is: if one of the iframes (they're all loaded from the same IIS server and really are ASPX pages) is taking a lot to load -...
31 Oct 2011 by Sid.Mup
Hi,I am using iframe to show a pdf on my webpage.I want to track how many number of times that PDF was printed.Print can be happened through Ctrl+P or Print option given by Adobe.Please help me and thanks in advance.
1 Nov 2011 by Member 8366814
I'm trying to make a carousel with iframes instead of pictures. Could anyone help with a website tutorial or some starting code? Bonus: if the iframe on the carousel zoomed in when moused over.
1 Nov 2011 by Prerak Patel
You may try jcarousel[^].Ref: http://forums.whirlpool.net.au/archive/1201337[^]
7 Dec 2011 by Rajesh_K_Sharma
Dear all, I am facing some issue related to Iframe.I have two websites which are hosted on different web server. In my first website , there are four pages Like page1,page2,page3 and page4 and pages contains 4 button button1,button2,button3 and button4 . When I click on button1 then...
7 Dec 2011 by Not Active
You will need to code it so the buttons navigate to the desired location. The page being displayed in the IFrame is not controlled from the page it is being hosted in.
16 Dec 2011 by Sergey Alexandrovich Kryukov
Anything on the Web page can be copied to the clipboard.If you want to do it programmatically, 1) think twice if you really want it; normally, the users themselves can do it better; 2) if you are decisively want it and still have a problem, go back to your question, tag your technology,...
16 Dec 2011 by Sergey Alexandrovich Kryukov
In response to clarified question:For this purpose, I would use jQuery library which you can freely download from http://docs.jquery.com/Downloading_jQuery[^].This is a jQuery plug-in good to copy any data to the client's clipboard:...
3 Jan 2012 by puneet_shah
Hi,I'm facing a problem of precedence showing a JavaScript alert.The page bears an ActiveX control; so, when I attempt to show the alert, it hides behind the ActiveX control as it has a higher precedence.Other way I've tried is Iframe. But, it takes huge amount of time to load.Any...
4 Feb 2012 by Christian Graus
I would put an alert in that click function to make sure it was being called, or use Chrome to put a breakpoint in the code, to see what was going on.
4 Feb 2012 by zyck
use can use either Chrome or built in debugger of Windows Explorer 7 or 8or Firefox-Firebug or Visual Studio 2008/2010 follow this steps....Visual Studio 2010 comes with debugger tool for javascript/ jquery. To enable Javascript debugger in Visual Studio, do the following:Enable Script...
22 Feb 2012 by puneet_shah
I've created a dialog in the ActiveX with look & feel of JavaScript message box and called it from JavaScript.
27 Feb 2012 by Tylernga
HiI have done this before (maybe not with iframes, but with framesets) so I know it works, but what I'm trying to do is run a function in another iframeeg:I have an iframe called "Main", and in Main it has a page with the following:function test(){alert("It works")}How...
27 Feb 2012 by _Maxxx_
Can you usedocument.getElementById('Main').contentWindow.test();?
12 Mar 2012 by shabibraza
I am showing my RDLC reports in an iframe . when i download my report to client then i want my previous page back. But iframe is not allowing me to do this.I want to close iframe thourgh html remaining inside the iframe and want my control to previous pagebut iframe is giving me blank page...
12 Mar 2012 by uttam2010
You can use Hyperlink||Button on html remaining inside the iframe, that allow to navigate your previous page by link naviagteUrl || "onclick" response.redirect("yourpre-page.aspx").
12 Mar 2012 by shabibraza
the thing u have provided doesnot work for meand where to use response.redirect i am doing with iframe and behind iframe i am using silverlight
27 Mar 2012 by Mellita
If i bookmark a page i would like to be in the respective page more over to another one, i will find the way from that page to refer in google to check it.
5 Apr 2012 by shahid1129
Hi, I need to develop a contact us page in my project which is usable for my user and they can also integrate this contact us page to their website also (Cross Domain)..please follow this example link for more detail ...
29 May 2012 by Narendrakumar Arya
Hi All,I am facing some problem with iframe tag in asp.net application.I have used this code:-
29 May 2012 by Keith Barrow
You don't state what the problem is, but a quick google suggests that IE7 & IFrame with height / width attributes do not play well together. You need to add a style:
1 Jun 2012 by Ravi Tuvar
Hi friends,I have created a playlist in html and playing a video in an iFrame tag, which is selected from a playlist.Now the problem is that on first time the page is loading the video works fine.But when i select any other video the older video leaves it's iframe object as a white box...
4 Jun 2012 by Vvelawras
Hello everyone!I would like to help me for something.Is there a way that someone can embedded iframe google maps in webbrowser control??string Locations = "http://maps.googleapis.com/maps/api/staticmap?center=" + this.txtLatitude.Text + "," + this.txtLongitude.Text + "&zoom=17&size=640x640...
11 Jun 2012 by Ravi Tuvar
Hey guys i am using an iFrame to load a video dynamically.The problem i am facing is when the video loads a white box is displaying in place of the video. The video loads properly and playing perfectly but this box never goes away. Since i change the url in address by to google.com or any...
20 Jul 2012 by Mohibur Rashid
I am interested to know about your server is it online? can I access it? or it just a local machine? if this is a local machine then it is sure that google server wont be able to get the pdf.When a client send a request to server it does not know what is going to be replied from server....
26 Jul 2012 by enhzflep
I created a (private, used by us in the timetable dept) alternative timetable viewing system for a college I worked at a couple of years back. This would display pdfs inside Iframes too. The code that I had was considerably shorter for embedding the pdf.Basically, the JS would construct the...
5 Aug 2012 by Elk Cloner
I have a html page with two iframe[its names are frmMenu and frmContent]. iframe with name frmMenu load a html page having a list of redirection links[a tag]. Is it possible to load the pages on iframe frmContent when i click the link on iframe frmMenu. Is it possible to do with...
5 Aug 2012 by Elk Cloner
4 Sep 2012 by ethanlokesh
Hi,I have a form which consists of some textfields, textarea , file for browsing and a submit button. I want to browse the file and as soon as the file get browsed the contents of the selected file should be copied to the text area and once the content is copied to the text area, I will...
24 Sep 2012 by gopal_nivas84
hi..i pro-grammatically created a iframe in my child window of silver-light application.now i try to call my child window and its open with empty.the iframe is not loading.below is my code:System.Windows.Browser.HtmlElement iframe;iframe =...
25 Sep 2012 by Christian Amado
Hi there, mmmm... I think that your scenario is not possible. Investigating about your question I found this very useful article http://msdn.microsoft.com/en-us/library/cc221359(v=vs.95).aspx[^]In your case, you can put the iframe on your aspx page and call it using a third party control...
8 Oct 2012 by Mac12334
Hi allI want to build a page having custom Google search with dynamic Iframe height.(No Scroll bar in the iframe).i have tried this function autoResize(id){ var newheight; var newwidth; if(document.getElementById){ ...
8 Oct 2012 by Mac12334
Hi allI want to build a custom Google search.Means:-I have a text box and a button.when i write some thing inside the textbox and click button then automatically it will show the result of Google.means when i write asp.net in google it shows some result.i want that result when i...
17 Oct 2012 by Shruthi.BT
Hi, I am using an iframe in a page where the iframe looks like a div on the main asp.net page. In the Iframe page i have got a close button and when i click on close button i am calling a javascript function in iframe page which is having the code as:window.location.href =...
28 Oct 2012 by enhzflep
Okay this will do what I understand to be the bread-and-butter of the task at hand.I do notice that if I try to linkn to a script or a css etc - in fact any file-based resource from the iframe, that I have to give it a fully qualified path. Running from localhost and leaving a link like
6 Nov 2012 by Sebastiaan Meijerink
You'll need to destroy the iframe component. An I frame is not a window. So window.close won't do anything. You can however call a function in the top level window. As long as the content of you iframe is in the same domain.So instead of window.close() you do...
18 Nov 2012 by RainLover
Here's a sample code:function on_iframe_load() { document.getElementById('iframe_a').onload = function() { alert('Thanks for the visit!'); };}
18 Nov 2012 by Jamal Seyedi
try contentWindowdocument.getElementById('iframe_a').contentWindow.onload = function() { alert('Thanks for the visit!'); };
27 Nov 2012 by shajarian_lover
Hi,i have a asp page that contains linkButtons and one iframei want to do this, when user clicked on buttons, the "src" attribute of iframe change and then the content of destination loaded to iframe, and when the iframe is loading,the loading show to user, this my asp page
2 Apr 2015 by keerthana.k
Hi friends,What is alternate for iframe in html5. I dont need iframe concepts. Which browsers are support in alternative way.
17 Jan 2013 by mechary
Hi,I need to embed a web site url using Object tag. for this I need to use runat = 'server'.It is throwing error to have a classid. How do I get the classid for a website url.Is there any way that I can embed webside other than object. I tried with 'iframes' but the site inside iframes...
17 Jan 2013 by Tharaka MTR
Instead of setting object as a server side variable you can try as follows." style="height:800px;width:800px;" />In here url is a server side variable.some times you want to set the param fields also