473,466 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

change iframe contenttype

All,

I would like to display some xml (generated on the client side) within
an iframe on my ASP page and let IE handle the xml display with + -
color coding etc.

My client side jsvascript writes XML to this iframe dynamically (if i
do a view source, I see the XML alright). However, IE does not render
it nornally (+ - color coding etc).

How do I set the content type to "text/xml" so IE will handle the
display of XML within this iframe? Pl note that I do not want to
create a separate page and set the iframe's src to this page.

Thanx in advance!

-j-
Jul 20 '05 #1
4 15639
Ivo
"jonam" <ey*****@hotmail.com> wrote
I would like to display some xml (generated on the client side) <snip>
How do I set the content type to "text/xml" so IE will handle the
display of XML within this iframe?


I haven't checked the details on xml and iframes, but when writing into new
windows I notice quite a difference in my IE between

with(open('','pop','resizable,scrollbars').documen t){
open('text/plain');write('<b>hello</b> jonam');close();
}

and

with(open('','pop','resizable,scrollbars').documen t){
open('text/html');write('<b>hello</b> jonam');close();
}

Perhaps it may provide a clue,
Ivo
Jul 20 '05 #2


jonam wrote:
I would like to display some xml (generated on the client side) within
an iframe on my ASP page and let IE handle the xml display with + -
color coding etc.

My client side jsvascript writes XML to this iframe dynamically (if i
do a view source, I see the XML alright). However, IE does not render
it nornally (+ - color coding etc).

How do I set the content type to "text/xml" so IE will handle the
display of XML within this iframe? Pl note that I do not want to
create a separate page and set the iframe's src to this page.


There was a time when browsers like Netscape 4 supported
winOrFrameObject.document.open('mime-type-here')
but I don't think that either IE6 or Netscape 7 supports
document.open('text/xml')

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #3
Thanx for a prompt response, Ivo. MSDN says that 'text/html' is the
only option.

I need to change the content type of the iframe to 'text/xml' via a
client side javacript. I really hope someone had encountered this
problem before and was able to solve it.

-j-
Jul 20 '05 #4
Martin Honnen <ma*******@yahoo.de> writes:
There was a time when browsers like Netscape 4 supported
winOrFrameObject.document.open('mime-type-here')
but I don't think that either IE6 or Netscape 7 supports
document.open('text/xml')


According to MSDN, IE does. It's not part of the W3C DOM though,
probably because you decide the type when you create the document
element, not when you open it for writing.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #5

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

Similar topics

1
by: hqi | last post by:
Hi I'm src: <TD WIDTH=559 HEIGHT=100%> <script language="JavaScript"> document.write("<iFRAME WIDTH=559 height=100% SRC='dane.html'></iframe> "); ... I would like to change size (HEIGHT i...
2
by: google | last post by:
I have a HTML file that contains an iframe. The HTML file is served by one server. The iframe contains a link to a completely different server. My question is, can any action in the iframe (such...
5
by: jim.frantzen | last post by:
You have an active XMLHTTP request on the main page (localhost/App1/index.aspx) The XMLHTTP request takes about 60 seconds to receive a response back from localhost/App1/getxml.aspx. You have an...
16
by: Mcginkel | last post by:
I am trying to find a way to load XHTML content in an Iframe. I use to do this in html by using the following code : var iframeObject = document.createElement("iframe");...
4
by: Jaco | last post by:
Hey, Maybe I am in the wrong newsgroup. I am writing an browserapplication. In the webpage I have 2 parts a fixed part and a variable part. The variable part is an IFRAME. If I press a button in...
1
by: Scott Nichols | last post by:
Hello, I have an asp.net application. The application dynamically creates an invoice. It is important to see and approve the invoice before it is updated in the database. So...I was...
0
by: NeilG | last post by:
Hi, I have an ASPX page with a literal control on the page. The page structure is like a frameset (but I dont use frames, this is just to give you an idea of how it looks) with records down the...
1
by: navi | last post by:
I have an iframe in which the source is an aspx page that retrieves a pdf and displays it. Upon page load, it clears the headers and sends the following: Content-Disposition: inline;...
2
by: Radu | last post by:
Hi, I have a "select" control named "cboSelectScorecardType", defined as <select id="cboSelectScorecardType" size="1" runat="server"> </select> which shows a list of files on my drive. It...
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,...
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,...
1
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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 ...

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.