devshb
Senior Member
United Kingdom
1904 Posts |
Posted - July 01 2005 : 17:59:58
|
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 |
|
|