request.formKey
NES2+Syntax
request.formKey
Description
The formKey property of the request object represents any form key that is sent. A key is specified by the NAME attribute in any element of an HTML <FORM>.
Example
Listing 8.105 shows how you can have a form with a "sports" key and use the request.formKey property to read the value.
Listing 8.105 Reading a formKey Property
<HTML> <HEAD> <TITLE>Listing 8-105: Using the formKey Property</TITLE> </HEAD> <BODY> <SERVER> // See if they have submitted or just need the form if(request.method == "POST"){ // Print the selected option to the user's page write('You selected ' + request.sports); }else{ // If this page was called and a form was not submitted, then write the // form to the page ... |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.