Server.Execute Error

wxdqz

New Member
Hello

I have no idea about XML!

I have some idea about ASP, but this is more of an XML question.

I have a photo gallery (a free download) which is made up of a pos.asp file, and index.html file, and a lizpod.xml file. In another directory, I have a few images.

When I upload all these files to my server and click on the index.html file, I get the following message:

Server object error 'ASP 0228 : 80004005'
Server.Execute Error
/newGallery/pod.asp, line 2
The call to Server.Execute failed while loading the page.

I am not too sure what causes the error.

The code in the pod.asp file is:

<%@ language="javascript" %>
<% Server.Execute("/metatraffic/track.asp") %>

<%
var pod_type = Request.QueryString("pod")

var xmlPod = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")
xmlPod.load(Server.MapPath(pod_type+".xml"))

xmlPod.async = false
var xmlPodRoot = xmlPod.documentElement
var xmlPodChildren = xmlPodRoot.childNodes
var xmlPodChildLength = xmlPodChildren.length
%>

<HTML>
<HEAD>
<TITLE>PicturePod - <%=(xmlPodChildren.item(0).text+" - ("+xmlPodChildLength+" pictures)")%></TITLE>

<style type="text/css">
<!--
A {color: #9999CC;}
-->
</style>

<SCRIPT language="javascript">
<!--
function preload() {
<%
for (var y = 1; y < xmlPodChildLength; y++) {
Response.Write("var picPod"+y+"= new Image()\n")
Response.Write("picPod"+y+".src = 'images/"+xmlPodChildren.item(y).childNodes.item(0).text+"'\n")
}
%>
}

var img = new Array()
<%
for (var x = 1; x < xmlPodChildLength; x++) {
Response.Write("img["+x+"] = 'images/"+xmlPodChildren.item(x).childNodes.item(0).text+"'\n")
}
%>

var divText = new Array()
<%
for (var x = 1; x < xmlPodChildLength; x++) {
Response.Write("divText["+x+"] ='"+xmlPodChildren.item(x).childNodes.item(1).text+"'\n")
}
%>

var n = 1
var i = img.length - 1

function next() {
n=n+1
images[1].setAttribute("src",img[n])
text[0].innerHTML=divText[n]
if (n >= img.length) {
images[1].setAttribute("src",img[1])
text[0].innerHTML=divText[1]
n=1
}
}

function previous() {
n=n-1
images[1].setAttribute("src",img[n])
text[0].innerHTML=divText[n]
if (n < 1) {
images[1].setAttribute("src",img)
text[0].innerHTML=divText
n = i
}
}
//-->
</script>

</HEAD>

<BODY onLoad="preload()" background="images/tile.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table border="0" width="100%" align="center">
<tr><td align="center" valign="top">
<map name="pod_top">
<area alt="" coords="289,4,349,29" href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:window.close();void(0)">
</map>
<img src="images/pod_top.gif" border="0" usemap="#pod_top">
<br>
</td></tr>
<tr><td align="center" valign="middle">
<%
Response.Write("<img name='img1' id='img1' src='http://www.webdeveloper.com/forum/archive/index.php/images/"+xmlPodChildren.item(1).childNodes.item(0).text+"' border='0' align='center'>")
Response.Write("<div name='div1' id='div1'>"+xmlPodChildren.item(1).childNodes.item(1).text)
%>
</td></tr>
<tr><td align="center" valign="bottom">
<br>
<img src=http://www.webdeveloper.com/forum/archive/index.php/"images/pod_bot.gif" alt="" border="0" usemap="#podmap">
<map name="podmap">
<area alt="" coords="291,11,346,30" href="javascript:next()" shape="RECT">
<area alt="" coords="201,10,286,30" href="javascript:previous()" shape="RECT">
</map>
</td></tr>
</table>

<script language="javascript">
<!--
var images = document.getElementsByTagName("img")
var text = document.getElementsByTagName("div")
-->
</script>

</BODY>
</HTML>

<%
xmlPod = null
xmlPodRoot = null
xmlPodChildren = null
xmlPodChildLength = null
pod_type = null
%>


and the code in the lizpod.xml file is as follows:

<?xml version="1.0" ?>

- <pod>
<title>Liz Hurley</title>
- <picture>
<image>bed_1.jpg</image>
<text>Picture 1</text>
</picture>
- <picture>
<image>bed_2.jpg</image>
<text>Picture 2</text>
</picture>
- <picture>
<image>bed_3.jpg</image>
<text>Picture 3</text>
</picture>
- <picture>
<image>bed_4.jpg</image>
<text>Picture 4</text>
</picture>
- <picture>
<image>bed_7.jpg</image>
<text>Picture 5</text>
</picture>
</pod>

If anybody could help me, I would be grateful.

Many thanks

Tortuga
 
Back
Top