473,321 Members | 1,778 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,321 software developers and data experts.

Request.Form - nvacher problem...

Thanks in advance for any help...

I have a piece of code - viewbasket.asp where variable
strProdCode and intQuant are pulled from itemsOrdered table on a
Loop from the DB (SQL Server) after they have been added, which
it does correctly...

<form action="checkout.asp" method="post" id="form1"
name="form1">

<input name="quant<%= strProdCode %>" value="<%=intQuant%>"
maxlength="2">

<input type="submit">

If you change the quantity and update - it goes to Checkout.asp
where again it loops thru and creates a variable
'quantProductCode' to see if there is a match with Request.Form
("element") and if so change it....

set rsProd = server.createobject("ADODB.Recordset")
strSQL = "select * from itemsOrdered where itemsOrdered.orderID
= " & cstr(Session("orderID"))
set rsProd = Conn.Execute(strSQL)

if rsProd.EOF and rsProd.BOF then
Session("orderID") = ""
Response.redirect "checkout.asp"
End if

rsProd.movefirst
while not rsProd.EOF
element = "quant" & rsProd("productCode")
intQuant = Request.Form("element")
response.write element & " - " & Request.Form("element")
& " - " & intQuant

if intQuant <> "" and isNumeric(intQuant) then
if intQuant = 0 then
rsProd.Delete
Session("morethangiftcert") = ""
else
rsProd("quantity") = intQuant
End if
End if

rsProd.Update
rsProd.MoveNext
The problem - this was originally set to be:
intProdID on viewbasket.asp and rsProd("productID") on
checkout.asp - integers which worked and did the change...

the new ProductCode variable is nvarchar... and does not work

if i do a response.write on both pages i can see that the
quantProductCode in both cases match - but checkout.asp doesn't
see the value quantity being passed in the form...

Any ideas of how to fix this? i'd stick to productID but i have
products in more that one table, which is necessary for what im
doing - your help is appreciated.

----------------------------------------------
Posted with NewsLeecher v2.0 Beta 5
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------

Jul 22 '05 #1
1 1480
Just at quick glance, I see that you have Resquest.Form("element") instead
of Request.Form(element).

Ray at work

"InvisibleMan" <in**********@nodomain.com> wrote in message
news:pP*******************@fe2.texas.rr.com...
element = "quant" & rsProd("productCode")
intQuant = Request.Form("element")

Jul 22 '05 #2

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

Similar topics

6
by: Christopher Brandsdal | last post by:
Hi! I get an error when I run my code Is there any other way to get te information from my form? Heres the error I get and the code beneath. Line 120 is market with ''''''''''''Line...
5
by: Wayne Wengert | last post by:
I am trying to use Request.Form to differentiate between when a page containing a form is first loaded and when it is reloaded as a result of the user clicking on the Submit button. Things are not...
2
by: Harag | last post by:
Hi All Using: JScript IIS 5 I have a problem in the following code: // The next 4 lines display exactly what was typed in the text boxes. out("<br>Request.Form="+...
5
by: Paxton | last post by:
I created an html email containing a form whose method is POST. The form is posted to an asp page for processing, but no values are retrieved. So I response.write all the Request.Form fields, and...
5
by: Jack | last post by:
Hi, I am trying to get a thorough understanding of a code where a addition or deletion of records can be done from a list of records. For addition part of the form, data is being obtained from set...
14
by: Harry Keck | last post by:
I have client side code that uses xmlhttp to make an asyncronous call to the server. This call really churns the server and can take a couple of minutes to finish. I have found that while this...
10
by: Steve Last | last post by:
Hi all, I’m using IIS6 for our college Intranet and I’m having trouble using Request.Form. Here is my code: <% If Request.QueryString("action") = "show" Then Response.Write "title: " &...
9
by: Dave | last post by:
Hi, I've been trawling the web for answer to my problem with no luck although I'm hardly alone it seems! Below is the generated source for an ASP page that posts a value called 'album' to...
5
by: =?Utf-8?B?QVRT?= | last post by:
PRB JavaScript in ASP with Request.Form Please help, I'm having a problem with JavaScript in ASP, where the ASP page crashes when I try to determine if data was posted from a FORM or through a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.