473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

innerHTML equivalent of an iframe element?

Is it possible to get the contents of an iframe (I need a method that
allows me to get the generated HTML code of an XML file that was
transformed by an XSL file)?
Thanks in advance! :)

Apr 22 '07 #1
5 7343
On 22 Apr, 23:35, tsukasa...@gmail.com wrote:
Is it possible to get the contents of an iframe (I need a method that
allows me to get the generated HTML code of an XML file that was
transformed by an XSL file)?

Thanks in advance! :)
have you thought to transform the xml to json and just push it to a
handler in the parent frame ala googlemail

Apr 22 '07 #2
On Apr 22, 3:35 pm, tsukasa...@gmail.com wrote:
Is it possible to get the contents of an iframe (I need a method that
allows me to get the generated HTML code of an XML file that was
transformed by an XSL file)?

Thanks in advance! :)
I've just been reading the YUI connection library <URL:http://
developer.yahoo.com/yui/connection/>. The library has the following
two lines of code to read the contents of an iframe when the iframe
has finished loading. "io" is the frame, and "obj" is just where they
want to store the contents of the frame.

obj.responseText = io.contentWindow.document.body ?

io.contentWindow.document.body.innerHTML :
null;
obj.responseXML = io.contentWindow.document.XMLDocument ?

io.contentWindow.document.XMLDocument :
io.contentWindow.document;

I really don't know the quality of these two lines of code.
Determining that is my next job. Anyone have any thoughts?

Peter

Apr 23 '07 #3
On Apr 23, 1:25 am, shimmyshack <matt.fa...@gmail.comwrote:
have you thought to transform the xml to json and just push it to a
handler in the parent frame ala googlemail
But the entire point of doing it this way is have the browser use its
built-in XSL transformation, so that I don't have to do it with a
JavaScript library like Sarissa. This makes the site considerably
lighter since it's all part of the browser.

On Apr 23, 2:10 am, Peter Michaux <petermich...@gmail.comwrote:
I've just been reading the YUI connection library <URL:http://
developer.yahoo.com/yui/connection/>. The library has the following
two lines of code to read the contents of an iframe when the iframe
has finished loading. "io" is the frame, and "obj" is just where they
want to store the contents of the frame.

obj.responseText = io.contentWindow.document.body ?

io.contentWindow.document.body.innerHTML :
null;
obj.responseXML = io.contentWindow.document.XMLDocument ?

io.contentWindow.document.XMLDocument :
io.contentWindow.document;

I really don't know the quality of these two lines of code.
Determining that is my next job. Anyone have any thoughts?

Peter
Thanks, I haven't thought of that :) I'll give it a try in a few
hours ;p

Apr 23 '07 #4

On the other hand, it seems somebody already "stole" my idea for
simpler AJAX :(

Apr 23 '07 #5
Oh er, shimmyshack, it seems I misunderstood you.

That would be a pretty good idea, yes, but the HTML that you get as a
result is supposed to be taken and put in a container in the parent
frame via DOM or innerHTML :p

Apr 23 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Soren Vejrum | last post by:
I am working on a web-based html editor using MSIE's designmode and iframes. Everything works just fine, but MSIE changes all my relative "a href" and "img src" links (i.e. "/index.asp") to...
4
by: JimMenees | last post by:
(code is at end of post) ------------------------------------------- I'm using an i-frame to grab a server-side text file and display its content elsewhere in the html document. On change of the...
4
by: L Anthony Johnson | last post by:
Has anyone had any success doing this. I have tried, but the InnerHTML property always comes back as an empty string. L Anthony Johnson
7
by: Hoss | last post by:
Hello all- This is what im trying to achieve. At the top of my page there is some search functionality, through which you cause to be loaded a string representing an HTML page. Below this and...
22
by: Chris Moltisanti | last post by:
Hey, I have a DIV and I want to dynamically set its innerHTML. I know I can set it by doing the following myDiv.innerHTML = '<img src=\"myImage.gif\">' However, the html that I want to set in...
1
by: urielka | last post by:
what i want to do is to: create a iframe,set his src to let say http://www.google.com then in the iframe(using code from the mainpage) get the search input element and fill it and get the links from...
6
by: CES | last post by:
All, Visual Studio 2005 doesn't include an auto complete item for innerHTML document.getElementById("SomeID").innerHTML, is their a way of referencing the inner text of an element without using...
6
by: cantrell78 | last post by:
I can't for the life of me figure out how to execute javascript inside of div that was set using innerHTML or in my case using cloneNode and replaceChild (not my idea to do this, I'm just fixing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.