Request.QueryString

T

thomas

I'm having a bit of trouble using Request.QueryString(). I want to click on
the link to browse all <artist> records in an xml file begining with a
particular letter. Any ideas where I'm going wrong?

index.html
=======
<html>
<body>

<p>browse by artist</p>
<a href="browse.asp?id=a">A</a> |
<a href="browse.asp?id=b">B</a> |
<a href="browse.asp?id=c">C</a>

</body>
</html>


browse.asp
========
<%@ Language="VBScript" %>

<%

dim objDom, fileExists, objFieldValue, objPI

st1 = Request.QueryString("id")

set xmlDocument = CreateObject("MSXML2.FreeThreadedDOMDocument")
xmlDocument.async="false"
xmlDocument.load(Server.MapPath("db/data.xml"))

set xslDocument = CreateObject("MSXML2.FreeThreadedDOMDocument")
xslDocument.async="false"
xslDocument.load(Server.MapPath("browse_results.xsl"))

Set XSLTemplate = Server.CreateObject("MSXML2.XSLTemplate")
Set XSLTemplate.stylesheet = xslDocument
Set proc = XSLTemplate.createProcessor()

proc.input = xmlDocument
proc.addParameter "text0", st1
proc.Transform
Response.Write proc.output

%>
 
R

Ray Costanzo [MVP]

What error are you getting? What unexpected results are you getting? Etc.

Ray at work
 
T

thomas

Nothing apart from "The page cannot be displayed" Take a look
http://www.madtim67.com/guitar/index.html

I use different versions of the asp page (using Request.Form instead of
Request.QueryString) and the xsl page that outputs the results without any
problems and i'm pretty sure my html page is correct.

I've never passed values using a link and Request.QueryString before, I
thought I was doing it wrong.
 
R

Ray Costanzo [MVP]

I don't think the querystring is your issue. First step is to get your
browser to show you what's really happening.
http://www.aspfaq.com/show.asp?id=2109

And then you'll see:
msxml3.dll error '80004005'

A reference to variable or parameter 'endPos' cannot be resolved. The
variable or parameter may not be defined, or it may not be in scope.

/guitar/browse.asp, line 18

In the code you posted, I don't see any "endPos" variable, so it's hard to
say what's going on there.

Ray at work
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top