Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 4th, 2003, 05:04 AM
Registered User
 
Join Date: Jun 2003
Location: Guernsey, , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default List Box

Hi guys,
What would be nice is if I could create a list box make my selection, continue through my form filling out a couple of text boxes, etc then click submit and the entry held from the list box is the name of new asp page.

e.g. The list box would contain a number of letters.

Letter1
Letter2
Letter3

Say I chose letter2 then upon submit, up would open letter2.asp and the address detail from the text boxes will pull through.

I've sorted the text box bit because orginally I only had one letter, but the list box has me stumped.

Sorry I need this in VB rather than Java.

Please help.

Craig
Thanks for giving the benefit of your grey matter, just lost mine after bashing it against this brick wall
  #2 (permalink)  
Old June 4th, 2003, 05:55 AM
Authorized User
 
Join Date: Jun 2003
Location: Rottum, , Netherlands.
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by CraigD
 Hi guys,
What would be nice is if I could create a list box make my selection, continue through my form filling out a couple of text boxes, etc then click submit and the entry held from the list box is the name of new asp page.

e.g. The list box would contain a number of letters.

Letter1
Letter2
Letter3

Say I chose letter2 then upon submit, up would open letter2.asp and the address detail from the text boxes will pull through.

I've sorted the text box bit because orginally I only had one letter, but the list box has me stumped.

Sorry I need this in VB rather than Java.

Please help.

Craig
Thanks for giving the benefit of your grey matter, just lost mine after bashing it against this brick wall
Gerhard Wentink
  #3 (permalink)  
Old June 4th, 2003, 05:59 AM
Authorized User
 
Join Date: Jun 2003
Location: Rottum, , Netherlands.
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry, clicked to early.

Do you mean
<select>
<option value="Letter1.asp">Letter1</option>
<option value="Letter2.asp">Letter2</option>
</select> ???

Regards

Quote:
quote:Originally posted by CraigD
 Hi guys,
What would be nice is if I could create a list box make my selection, continue through my form filling out a couple of text boxes, etc then click submit and the entry held from the list box is the name of new asp page.

e.g. The list box would contain a number of letters.

Letter1
Letter2
Letter3

Say I chose letter2 then upon submit, up would open letter2.asp and the address detail from the text boxes will pull through.

I've sorted the text box bit because orginally I only had one letter, but the list box has me stumped.

Sorry I need this in VB rather than Java.

Please help.

Craig
Thanks for giving the benefit of your grey matter, just lost mine after bashing it against this brick wall
Gerhard Wentink
  #4 (permalink)  
Old June 4th, 2003, 08:46 AM
Registered User
 
Join Date: Jun 2003
Location: Guernsey, , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Gerhard, cheers for your help so far.

I have already played around with the following.

<form size="3">
<select name="Letter" onChange="this.form.submit()">
<option value="letter.asp">Choose a Letter</option>
<option value="FrmStdletter.asp">Standard Letter</option>
<option value="FrmBasic.asp">Basic</option>
<option value="Frm1.asp" >Frm1</option>
<option value="Frm2.asp">Frm2</option>
</select>
<input type="submit" value="Submit">

<%


%>
</form>

However, what I need is for the button to open up say Frm1.asp(or what ever letter is selected), is there a next step I'm missing?

Thanks again,

Craig
  #5 (permalink)  
Old June 4th, 2003, 09:12 AM
Authorized User
 
Join Date: Jun 2003
Location: Rottum, , Netherlands.
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In the asp page that you submit this form to, you have to retrieve the value that is selected:
strRedirectPage=Request.Form("Letter")

and then Redirect to that page:

Response.Redirect(strRedirectPage)

Regards,

Gerhard Wentink
  #6 (permalink)  
Old June 5th, 2003, 09:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Sydney, NSW, Australia.
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can do this entirely client-side, by setting window.location to document.form1.Letter[form1.Letter.selectedIndex].value

Cheers
Ken
  #7 (permalink)  
Old June 6th, 2003, 05:39 AM
Registered User
 
Join Date: Jun 2003
Location: Guernsey, , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for all the help.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grab Values From List Box into Text Box phungleon VB How-To 2 June 19th, 2008 10:33 PM
multi-column list box values moved to 2nd list box sbmvr Access VBA 1 May 14th, 2007 01:58 PM
select box/List box alphabetic sort sasidhar79 Javascript How-To 3 November 10th, 2004 03:04 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM
Search using drop down list box and a text box tcasp Classic ASP Basics 1 July 31st, 2003 02:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.