474,046 Members | 2,542 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

iframe no loading in IE with javascript

2 New Member
IE seems to behave badly with iframe reloading in javascript.
The code below works fine in firefox but doesn't in IE.
The code loads some document into an iframe whenever we press the button.
The question is how do I make this code behave in IE?


[HTML]<script type="text/javascript">
function GetFile(url)
{
document.getEle mentById("IFram eGetFile").src = url
}
</script>
[/HTML].
.
.
[HTML]<button id="btnGetFile " name="btnGetFil e" onclick="GetFil e('ATableExcell .asp')" value="GetFile" >Get File</button>
<iframe id="IFrameGetFi le" name="IFrameGet File" src="" />[/HTML]
Feb 7 '08 #1
2 1343
pedrogameiropinto
2 New Member
I solved the problem. Reload the IFrame with this code instead (it works in IE 6.0 and firefox)

frames['IFrameGetFile'].location.href = url
Feb 7 '08 #2
acoder
16,027 Recognized Expert Moderator MVP
Hi, welcome to TSDN!

Glad you managed to fix it, but it should've worked - see this link.
Feb 7 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4818
by: Timmy | last post by:
Hi, I have some javascript that is within an iframe's src, however I do not want to execute it until the iframe's parent has finished loading. I have tried parent.window.onload = function() but that does not seem to wait, and then throws a "not implemnted error" If any one can help it is greatly appreciated.,
4
9012
by: Mark | last post by:
I am loading source files into several iframes, with each load happening after some user-generated event (like clicking a button). The loading works but I need to determine when the source file is FULLY loaded so I can do some calcs on its scroll height within the frame. If I check the scroll height right away (after fetching the file), it's wrong (some small number) but if I wait a couple of seconds I get the right value. I need to do...
1
7243
by: Mel | last post by:
how can i wait for one iframe to completely load before loading a second one ? thanks for your help
3
7155
by: Asterbing | last post by:
Since the "on fly addition..." thread has taken another direction, I'm opening a new one to be more explicit and recenter the subject. Well, the subject is to detect when a document is well loaded inside an iframe, knowing this document is CGI generated and that I can't modify the CGI itself (ie. add an onload event in the document body). All is said in the three HTML file I've copied below. Just create the three in same directory,...
8
5384
by: hyejin | last post by:
I have a problem with dynamic iframe and document.close() on Firefox. Below two files create a dynamic iframe by JavaScript. These two samples do not have any problems on IE. But, on Firefox, the icon on the top corner keeps running with "loading" message on the bottom status bar even though the browser completed everything in the iFrame. The line that causes the problem is "document.close()" in the included JS file. If this line is...
3
4505
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page includes background music with a javascript music player on the main page below an iframe that is used for all content and navigation of the site and so that the music doesn't reload each time a page is switched. There is another javascript to resize...
3
5011
by: synergy_711 | last post by:
I feel like this should be fairly easy but I have been struggling with this for sometime. I have not been able to find someone who's had the same problem as mine yet. http://g.bach.home.insightbb.com/movies.html I have a page set up on my website to view videos from various sites by creating html pages and creating links to view them inside an iframe. I'm getting tired of creating pages for every video that I find and it seems to make...
2
3294
riptide2049
by: riptide2049 | last post by:
I really have a problem here. I have a code that is suppost to take the href of a link from the right class;value of a link maked toreturn false. the value is a Media file the file is sent to quicktime or windows meida player depending on which plugin was found. after the plug in is found a iframe with the right player is created. here is the code. for some reason In IE the plug in doesnt work and in fire fox it crashes <!DOCTYPE html...
4
1726
by: sunil | last post by:
How do I find the length of page in target iframe? I am looking for the code or give me idea to find the length
2
7180
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, I have a aspx page that loads PDF files into a frame (I call an ShowFile.aspx file that uses Response.BinaryWrite). I want that the user can see div with the message loading and finished it when the PDF file have been loaded. I have onload function for iframe but doesn't work, because never is called. Appears progress bar in IE 6.0 but not go up.
0
10548
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10339
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
12142
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11604
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
12027
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10313
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6837
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5420
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.