Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server.Execute Error - help please!

Status
Not open for further replies.

madHatter1

Technical User
Feb 27, 2003
54
GB
Hello

I have no idea about XML!

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

I have a Liz Hurley 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=&quot;javascript&quot; %>
<% Server.Execute(&quot;/metatraffic/track.asp&quot;) %>

<%
var pod_type = Request.QueryString(&quot;pod&quot;)

var xmlPod = Server.CreateObject(&quot;MSXML2.FreeThreadedDOMDocument&quot;)
xmlPod.load(Server.MapPath(pod_type+&quot;.xml&quot;))

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

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

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

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

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

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

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

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

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

</HEAD>

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

<script language=&quot;javascript&quot;>
<!--
var images = document.getElementsByTagName(&quot;img&quot;)
var text = document.getElementsByTagName(&quot;div&quot;)
-->
</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=&quot;1.0&quot; ?>

- <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

Hatter





 
hi,

Server.execute will works only IIS 5.0 (asp 3.0). You might have loaded asp file in IIS 4.0.



 
or is it

When I upload all these files to my server and click on the index.html file


should be index.asp ?

_____________________________________________________________________
Where have all my friends gone to????
onpnt2.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top