Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #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
__________________
Thanks for giving the benefit of your grey matter, just lost mine after bashing it against this brick wall
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 05:04 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.