ASP Help if anyone can

  • whosonthedexs
  • Student
  • Student
  • User avatar
  • Posts: 72
  • Loc: UK

Post 3+ Months Ago

Right...I'm very new to ASP & coding in general but what i am looking for is a way in which to use a web form with 3 fields: Category, Month & Year. Once the criteria has been selected, submit is clicked and then the page relevant to the Category, Month & Year selected is displayed.

I'm assuming this should just be a small verification script that links back to the page name...

I've had a look to the best of my ability around the web and found various tutorials but nothing that seems to help me here....I need a starting ground. I have the very very basics...

If any one can help it will be greatly appreciated.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • rajonweb
  • Newbie
  • Newbie
  • rajonweb
  • Posts: 13
  • Loc: Dharwad, KARNATAKA. INDIA

Post 3+ Months Ago

Do mean something like this

Category = "HardDrive"
Month = "Jan"
Year = "2004"
Resultant page:
"HardDrive_Jan_2004.asp" or
"HardDriveJan2004.asp" or
"www.somewhere.com/HardDrives/2004/Jan/default.asp"
some path that uses values for filename

if you mean this:

1. Use a redirection lookup page that is onsubmit action of your form

I assume its MYLOOKUP.ASP and redirection page is "HardDrive_Jan_2004.asp"

in this file just type this code:

==============================

<%
dim strCat
dim strMonth
dim strYear
strCat = request.form("frmcategory")
strMonth = request.form("frmmonth")
strYear = request.form("frmyear")
response.redirect strCat & "_" & strMonth & "_" & strYear & ".asp"
%>

==============================

Ok thats it dont type those =================== lines

request.form("frmcategory") actually requests the server the form fields
that is, it request the value of field frmcategory that i assume as the category field of the form

:idea: to use a different page that does not use the field values assume "mypage.asp" then use the if condition first and then use a response.reidrect statement to redirect to a "mypage.asp"

Here's the code

=====================================
<%
dim strCat
dim strMonth
dim strYear
strCat = request.form("frmcategory")
strMonth = request.form("frmmonth")
strYear = request.form("frmyear")
if strCat="HardDrive" and strMonth="Jan" and strYear="2004" then
response.redirect "mypage.asp"
%>

==============================


:?: :?: Clarifications Required PM Me.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 96 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.