VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 General help me questions
 Where Request("Action.x") defined?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cho7536
Starting Member

36 Posts

Posted - July 01 2005 :  15:09:36  Show Profile  Reply with Quote
I am trying to create my own form to save user input to db. Many of the forms use Request("Action.x") to trigger posting action and I would like to where this variable is defined. Is it part of form variables? For example, where or how can I reference this Request("Action.X") in "Shopcustregister.asp"?

Thanks

devshb
Senior Member

United Kingdom
1898 Posts

Posted - July 01 2005 :  17:59:58  Show Profile  Visit devshb's Homepage  Reply with Quote
Action is the name of the submit text button or the submit image button that vpasp uses.

If you use a text button then if it's been pressed then Request.Form("buttonname") will be not-null.

For image buttons, you just add ".x" to the end of the request object, eg Request.Form("buttonname.x") - your image button will still be called "buttonname" though; there is no ".x" object explicitly defined; it's just an internal thing.

You only really need to check for that if you use more than one submit button on the form. If you only have a single submit button then you only need to check for the mode.

Here's some examples:

Sub BYZ_QO_GET_POSTINGMODE
Dim tbutton1
Dim tbutton2
if (Request.ServerVariables("REQUEST_METHOD")="POST") then
byz_qo_postingmode="POSTING"
tbutton1=Request.Form("byz_qo_button_get_product_info")
if (tbutton1="" or IsNull(tbutton1)=true) then
tbutton1=Request.Form("byz_qo_button_get_product_info.x")
end if
tbutton2=Request.Form("byz_qo_button_send_to_trolley")
if (tbutton2="" or IsNull(tbutton2)=true) then
tbutton2=Request.Form("byz_qo_button_send_to_trolley.x")
end if
if (tbutton1<>"" and IsNull(tbutton1)=false) then
byz_qo_form_action="GET_PRODUCT_INFO"
end if
if (tbutton2<>"" and IsNull(tbutton2)=false) then
byz_qo_form_action="SEND_TO_TROLLEY"
end if
else
byz_qo_postingmode="NEW"
byz_qo_form_action="DISPLAY"
end if
End Sub

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on July 01 2005 18:00:57
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000