Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic 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
 
Old July 9th, 2003, 09:05 AM
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to VTtigger
Default Dynamically reading form values

Ok guys, this one's a toughie and I'm under a deadline!

Ok, I have a few STATIC listboxes in a webform, standard, run of the mill, pick a state, listboxes. Set up like this:
<select name="selState"
   <option value="1">AK</option>
   <option value="2">AL</option>......and so on

What I need to do is add this tag:
<%Call RequestInfo("selState","")%> where, in the second set of "" I need to read and send the selected option to the next method. In a separate file named "scripts.asp" there is a case method that checks the first three letters of the name to see what kind of form item it is. I then needs to write the item name and the value to a URL. Sooooo, I need to get the value some how.

This is where I'm stumped.

Here is what the scripts.asp method looks like:

<%
  sub RequestInfo(objName, btnVal)
    Select Case left(objName,3)
      Case "rad", "chk"
    if Request(objName)=btnVal then
      Response.Write("checked")
    end if
      Case "sel"
    Response.Write ("Value='" & Request(objName) & "'")
      Case "txt"
    Response.Write ("Value='" & Request(objName) & "'")
      Case "txa"
    Response.Write("Value='" & Request.Form(objName)& "'")
    End Select
  end sub
%>
Sooooo, somehow, I need that "'" in the "sel" case to return the selected value that needs to be read in from the form.

Any ideas??????????

PS. the text area "txa" doesn't work either so any help on that would be nice too

Crystal Owings
[email protected]
 
Old July 9th, 2003, 01:01 PM
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to VTtigger
Default

I got this fixed. A friend of mine helped me out and it takes a bit of time and a bit of code, but once it works it's great and it saves a lot of hardcoding time. If you want the code, email me at [email protected], it's 3 files long so I don't want to post it in a forum.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Values from recordset lost after reading vanik.cz Classic ASP Databases 11 January 4th, 2008 07:36 AM
Reading current http url dynamically in php hi2php PHP How-To 1 November 1st, 2006 04:16 AM
Dynamically generated textboxes and their values Frode ASP.NET 2.0 Basics 1 April 17th, 2006 03:46 PM
Problem reading datetime values eresina ADO.NET 0 February 5th, 2005 12:51 PM
Reading Form values into PHP peteburford BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 August 20th, 2004 11:23 AM





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