xmlDOMDoc & include.asp

R

Ragnar

In myPage.asp I am calling a function which is stored in an
include-asp-file. Unfortunately I get an empty screen

myPage.asp:
............
<!--#include virtual="include.asp" -->
<% Call DisplayNavigation() %>
...........

include.asp:
<%
Function DisplayNavigation()
set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("note.xml")
response.write xmlDoc.xml
End Function
%>

all 3 files are stored in same folder
 
M

Martin Honnen

Ragnar said:
In myPage.asp I am calling a function which is stored in an
include-asp-file. Unfortunately I get an empty screen

myPage.asp:
...........
<!--#include virtual="include.asp" -->
<% Call DisplayNavigation() %>
...........

include.asp:
<%
Function DisplayNavigation()
set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"

xmlDoc.async = False
xmlDoc.load("note.xml")

Ussing Server.MapPath could help to find the file

If xmlDoc.load(Server.MapPath("note.xml")) Then
Response.ContentType = "application/xml"
xmlDoc.save Response
Else
Response.Write xmlDoc.parseError.reason
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,007
Messages
2,570,266
Members
46,863
Latest member
montyonthebonty

Latest Threads

Top