473,386 Members | 1,647 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,386 software developers and data experts.

get the html source code from iframe

Dear sir,

I am writting an WYSIWYG html editor, I need to get the html source code out
of an iframe. I know I can use innerhtml or innertext. But that will remvoe
the html header info which is what I need. html header may contains
reference to base url or style sheet information.

How can I get the full source code out of an iframe???

--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com

Jul 23 '05 #1
2 9905
Guoqi Zheng wrote:
Dear sir,

I am writting an WYSIWYG html editor, I need to get the html source code out
of an iframe. I know I can use innerhtml or innertext. But that will remvoe
the html header info which is what I need. html header may contains
reference to base url or style sheet information.

How can I get the full source code out of an iframe???


..innerText is IE-only but your Editor probably is also.

document.documentElement.outerHTML will give you 99% of whats in the
current document. It doesn't give the DTD Declaration but seems to give
everything else.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
How can I stop a user's cursor from selecting/highlighting elements in a
window as they click and drag across the window? Though I want them to
still be able to click buttons etc.
Andrew Poulos
Jul 23 '05 #3

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

Similar topics

6
by: Wendi | last post by:
If i have an iframe from within an HMTL document: Iframe.htm: ------------------------------ <html> <head> <title>Iframe.htm</title> </head> <body> <iframe src="sample.htm"></iframe>
2
by: sebastiraj | last post by:
I have one JSP program in which one iframe is defined. And the source of which is an another jsp. Contents of an iframe is in hyperlink. When i click any of the hyperlinks one popup box will come....
5
by: David Elliott | last post by:
I need a control on a Web Page that can accept an HTML Document and will display it. Any help would be appreciated. Thanks, Dave Here is what I was trying...
3
by: news | last post by:
I am trying to get at the source of a web page. Looking at the innerHTML element is only part of the story. In IE, right-clicking on various different parts of the page gives me different results...
1
by: syshex | last post by:
Hi everyone ! I'm really new to javascript, and am possibly aiming quite high already, but still I feel I just satisfy my curiosity and ask you all this question. I've got this really really...
1
by: Jeremy | last post by:
Hi, I am attempting to load an ad Banner to coincide with a piece of video pre-roll. The following function is called which is supposed to create an empty IFRAME. Once this IFRAME object is...
1
by: Ming | last post by:
Hi there, I am not sure if this is the right place to ask this question :) I am looking for a snipper program that can give me the final content of a web page that visitors will see. If a...
3
by: kierandes | last post by:
Hey Guys, I am trying to make a iframe that changes depending on variables I call from a database. The database is working, variables are filling up, but I am having trouble with the echoing a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...

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.