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-Cart StoreFront Customer Forum

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

 All Forums
 VPCart Forum
 Request function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

32 Posts

Posted - July 24 2007 :  10:40:24  Show Profile  Reply with Quote
I see call to Request function in some of the .asp files.

I am customizing my shopping cart and I would like to use this function but I can't figure out if it is part of the vp-asp since I can't find that function definition. Any help in this will be appreciated . Thanks

Senior Member

United Kingdom
1898 Posts

Posted - July 24 2007 :  15:04:25  Show Profile  Visit devshb's Homepage  Reply with Quote
it's a standard vbscript function (ie not a vpasp function)
it's used to find out what an argument or field value is, or what button has just been pressed when submitting the form.

you can also use:

(to specifically find out what a field's value was upon form submission/posting)

(to specifically find out what an argument was in the url)

the general request("myname") function will fall-through, checking that name's value for arguments and fields.

for form submissions, when checking if a certain buttons was pressed, it is uses "name" and "name.x" on the checks, because when using image buttons for some weird reason the request object also needs a ".x" on the end of the name being requested. so, the bit with the "continue" checks in it is checking to see which button has just been pressed and to see if the form has just been submitted or if it's just been opened for the first time.

if your form only has one submit button on it, or if you only want to find out whether the form has been submitted or loaded for the first time, then you can use a server variable instead, ie:

if (Request.ServerVariables("REQUEST_METHOD")="POST") then
the form has just been submitted, now process it, using request("myfieldname") or request.form("myfieldname") etc to find what the values were
the screen has been opened but not submitted so just setup the default variables etc, or use request("myargumentname") or request.querystring("myargumentname") etc to find out what the querystrings were to the url (if any)
end if
now show the form

if you're delving into the asp side of things, then here's a fantastic link, a kind of online manual which explains with examples all the standard functions, definitely not a thing that's only for newbies; I use it all the time too, it's a really great reference manual and explains all the potential weirdnesses and syntax of the various functions:

VBScript Language Reference Manual:

(don't bother using the search function on that manual though because it'll just search the whole microsoft reference library; instead just drill-down on the functions/statements links etc on the left-panel; but watch out; that url only works properly on internet explorer, if you try it on netscape etc you end up with nested windows or errors each time you click on something)

annoyingly, for some strange reason, microsoft have put the request help outside that manual and put it into their iis manual instead:

Simon Barnaby
[email protected]
Web Design, Online Marketing and VPASP addons

Edited by - devshb on July 24 2007 15:35:55
Go to Top of Page

Starting Member

32 Posts

Posted - July 24 2007 :  16:11:03  Show Profile  Reply with Quote
Thank you very much Simon. This helps a lot.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000