Print Page | Close Window

Request Object

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1720
Printed Date: 28 March 2026 at 11:06pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Request Object
Posted By: ziwez0
Subject: Request Object
Date Posted: 09 April 2003 at 3:41pm

Hello,

Ive assigned a value to a link

<form action="next.asp" method="post">

<a href="next.asp" value="one" Name="Holiday">Click here</a>
</form>

And on the "Next.asp" page...

<!--#include file="Top.asp" -->
<%
objFlorida = Request.Form("Holiday")
%>

<%


Dim Conn, dbPath
  dbPath = Server.MapPath("/Database/photolibary.mdb")
  Set Conn = Server.CreateObject("ADODB.Connection")
  Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0; DATA SOURCE=" & dbPath

Set UserRecordset = Server.CreateObject("ADODB.Recordset")
sqlstring = "select * from Photo where SubCat = '" & objFlorida & "'"


UserRecordset.Open sqlstring, conn

Set objid = UserRecordset("ID")
set objLargeImage = UserRecordset("LargeImage")
Set objSmallImage = UserRecordSet("SmallImage")

While NOT UserRecordset.EOF
%>

<TABLE>

<%

Response.write "<tr><td><img src='Florida/" & objsmallImage & "'></td>"
UserRecordset.MoveNext
Response.write "<td><img src='Florida/" & objsmallImage & "'></td>"
UserRecordset.MoveNext
Response.write "<td><img src='Florida/" & objsmallImage & "'></td>"
UserRecordset.MoveNext
Response.write "<td><img src='Florida/" & objsmallImage & "'></td>"
UserRecordset.MoveNext
Response.write "<td><img src='Florida/" & objsmallImage & "'></td>"
UserRecordset.MoveNext
Response.write "<td><img src='Florida/" & objsmallImage & "'></td></tr>"
UserRecordset.MoveNext
wend

%>
</TABLE>
<%

 

conn.close
%>
<!--#include file="bottom.asp" -->

So the out come is nothing, i dont get any errors and i dont get  images i told it to pull out if value ="florida"

any ideas?



-------------
If anything takes long to do its worth doing.



Replies:
Posted By: MadDog
Date Posted: 09 April 2003 at 4:12pm

u cant use a link as part of the <form> tag. You have to use a submit button, <input type="submit" value="Submit">

Then for the 'Holiday' field u need to have a hidden value (or make an input). So for a hidden value it would  be, <input type="hidden" value="one" name="Holiday">

Or if you want a text box so you can enter do, <input type="text" value="one" name="Holiday" size="20">



-------------
http://www.iportalx.net" rel="nofollow">


Posted By: MorningZ
Date Posted: 09 April 2003 at 9:42pm
wow.. trying to do all that vbscript and don't even know basic HTML forms?

yikes, time to brush up on the basics....

-------------
Contribute to the working anarchy we fondly call the Internet



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net