R
Robert Mark Bram
Hi All,
Below are two pages I am testing: xmlTest.asp and basic.htm.
The idea is to have my asp page read display the (x)html page. Later I will
add code in the asp page to edit the contents of the xhtml page.
I am running IIS on Windows XP. I am testing with IE 6.0 and Netscape 7.1.
My problem is this:
When I view basic.htm in IE, I see it as a web page.
When I view xmlTest.asp in IE, I see it as a code!
When I view basic.htm or xmlTest.asp in NS, I view them as web pages..
What is going on here? Why is IE deciding to display code rather than the
web page?
Any advice would be most appreciated!
Rob
=======
xmlTest.asp
=======
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<%
var xmlDocument = Server.CreateObject("Msxml2.DOMDocument.3.0");
xmlDocument.async = false;
xmlDocument.setProperty ("ServerHTTPRequest", true);
var loaded = xmlDocument.load(Server.MapPath("about.htm"));
if (loaded) {
xmlDocument.setProperty("SelectionLanguage", "XPath");
Response.ContentType = "text/xml";
xmlDocument.save(Response);
}
else {
Response.Write("<p>Error loading XML document: " +
xmlDocument.parseError.reason + ".<\/p>");
}
%>
=======
basic.htm
=======
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<h1>Heading</h1>
<p>Body Text</p>
</body>
</html>
Below are two pages I am testing: xmlTest.asp and basic.htm.
The idea is to have my asp page read display the (x)html page. Later I will
add code in the asp page to edit the contents of the xhtml page.
I am running IIS on Windows XP. I am testing with IE 6.0 and Netscape 7.1.
My problem is this:
When I view basic.htm in IE, I see it as a web page.
When I view xmlTest.asp in IE, I see it as a code!
When I view basic.htm or xmlTest.asp in NS, I view them as web pages..
What is going on here? Why is IE deciding to display code rather than the
web page?
Any advice would be most appreciated!
Rob
=======
xmlTest.asp
=======
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<%
var xmlDocument = Server.CreateObject("Msxml2.DOMDocument.3.0");
xmlDocument.async = false;
xmlDocument.setProperty ("ServerHTTPRequest", true);
var loaded = xmlDocument.load(Server.MapPath("about.htm"));
if (loaded) {
xmlDocument.setProperty("SelectionLanguage", "XPath");
Response.ContentType = "text/xml";
xmlDocument.save(Response);
}
else {
Response.Write("<p>Error loading XML document: " +
xmlDocument.parseError.reason + ".<\/p>");
}
%>
=======
basic.htm
=======
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<h1>Heading</h1>
<p>Body Text</p>
</body>
</html>