473,385 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Passing text box value to sub?

Hi,
I'm trying to have a user enter the quantity he wants to order in the
text box and pass all the parameters to a sub called "add" on the same page.
I can't figure out how to pass the quantity entered to the sub. Can someone
help?
Thanks,
SC

Response.Write "<center><table border=""1""><tr>"
For i= 0 to RS.Fields.Count - 1
Response.Write "<th>" & RS(i).Name & "</th>"
Next
Response.Write "</tr>"
While Not RS.EOF
Response.Write "<tr>"
For i= 0 to RS.Fields.Count - 1
Response.Write "<td>" & RS(i) & "</td>"
Next
Response.Write "<td>"%><Input type="text" size="1" name="MEQTY"
value="0"></td><%
Response.Write "<td>"%><A
HREF="./thispage.asp?action=add&qty=?????&stockid=<%=RS.fi elds("Stock_ID")%>
&description=<%=RS.fields("description")%>">Order! </A></td><%
0011-00-030 THE SCIENCE OF HURDLING BOOKS 39 Order!
Jul 19 '05 #1
2 4058
where is the sub?

passing values to subs is easy:

<%
mystring = "boo"
sub testsub(var)
response.write(var)
end sub
call testsub(mystring)
%>

will produce:

boo
"Sean Cassidy" <ca*********@rogers.com> wrote in message
news:ud*************@tk2msftngp13.phx.gbl...
Hi,
I'm trying to have a user enter the quantity he wants to order in the
text box and pass all the parameters to a sub called "add" on the same page. I can't figure out how to pass the quantity entered to the sub. Can someone help?
Thanks,
SC

Response.Write "<center><table border=""1""><tr>"
For i= 0 to RS.Fields.Count - 1
Response.Write "<th>" & RS(i).Name & "</th>"
Next
Response.Write "</tr>"
While Not RS.EOF
Response.Write "<tr>"
For i= 0 to RS.Fields.Count - 1
Response.Write "<td>" & RS(i) & "</td>"
Next
Response.Write "<td>"%><Input type="text" size="1" name="MEQTY"
value="0"></td><%
Response.Write "<td>"%><A
HREF="./thispage.asp?action=add&qty=?????&stockid=<%=RS.fi elds("Stock_ID")%> &description=<%=RS.fields("description")%>">Order! </A></td><%
0011-00-030 THE SCIENCE OF HURDLING BOOKS 39 Order!

Jul 19 '05 #2
I would rather POST the form so that you can read the value using
Request.Form. Here you could read the value using JavaScript
(MyForm.MyField.value) so that you can pass this on the querystring (also
submitting a form with the GET Method will pas all field values on the
QueryString automatically).

Patrice
--

"Sean Cassidy" <ca*********@rogers.com> a écrit dans le message de
news:ud*************@tk2msftngp13.phx.gbl...
Hi,
I'm trying to have a user enter the quantity he wants to order in the
text box and pass all the parameters to a sub called "add" on the same page. I can't figure out how to pass the quantity entered to the sub. Can someone help?
Thanks,
SC

Response.Write "<center><table border=""1""><tr>"
For i= 0 to RS.Fields.Count - 1
Response.Write "<th>" & RS(i).Name & "</th>"
Next
Response.Write "</tr>"
While Not RS.EOF
Response.Write "<tr>"
For i= 0 to RS.Fields.Count - 1
Response.Write "<td>" & RS(i) & "</td>"
Next
Response.Write "<td>"%><Input type="text" size="1" name="MEQTY"
value="0"></td><%
Response.Write "<td>"%><A
HREF="./thispage.asp?action=add&qty=?????&stockid=<%=RS.fi elds("Stock_ID")%> &description=<%=RS.fields("description")%>">Order! </A></td><%
0011-00-030 THE SCIENCE OF HURDLING BOOKS 39 Order!

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
2
by: Richard | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** HI, I am working on a project where I need to input data to a (local) HTML page using multiple form elements, such as text,...
7
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID...
8
by: Johnny | last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form (fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip code. The user can enter a zip code in the text box and...
13
by: Deano | last post by:
Apparently you can only do this with one value i.e Call MyAssetLocationZoom(Me!txtLocation, "Amend data") This runs; Public Sub MyAssetLocationZoom(ctl As Control, formName As String) On...
12
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
7
by: AMP | last post by:
Hello, I have this in form1: namespace Pass { public partial class Form1 : Form { public Form2 form2; public Form1() {
5
by: moni | last post by:
Hi.. I am trying to use javascript for google maps display. If I call the javascript function from my aspx file I use: <input type="text" id="addresstext" value="Huntington Avenue,...
11
by: Bob Yang | last post by:
Hi, I have this in C++ and I like to call it from c# to get the value but I fail. it will be good if you can give me some information. I tried it in VB.net it works but I use almost the same way as...
11
by: =?Utf-8?B?U3VqZWV0?= | last post by:
If there are long strings (like 1MB or 2MB) is it more performant to pass those by ref to methods or by value?
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.