Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP - Request Object
Message
De
21/02/2000 12:21:02
Scott Knight
Human Resources Development Canada
St. John's, Terre-Neuve, Canada
 
 
À
21/02/2000 11:09:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00334833
Message ID:
00334892
Vues:
26
>Scott,
>
>>I created a HTML form from a VFP COM server that has numerous input controls (i.e. select,input,radio, etc etc). I have built the "name=" cluase based on the input type and file name (i.e. name=inFaxes_Type, Input control that is the faxes.type field in the database). After adding/editing the info. in the form I want to pass the request object back to the COM server save method. What is the VFP syntax to reference the items without know what the name is. I know the long hand is lorequest.form("inFaxes_Type").item(). In may case the methods are generic and the name cannot be hard coded. I Guess I'm looking for a way to to loop through the items picking out the name and value for each. I may need a way to access the equal of .count and Items.AtEnd() in VFP.
>
>Others may have easier ways of doing this, but you can get a string with *all* of the request info by referring to
request.form
This would return, for example,
firstname=Scott&address=Peachtree+Road&zip=12345
>
>You could then parse this to find out what was submitted.

I tried what you suggested and I can certainly see how it can work. However, request.form returns and awful ugly piece of string with numerous characters encoded into it. I could see this getting very long and hard to code and manage. I may even be way of track in what I am trying to do. I thought I would receive the Request Object in the Ofaxserver.Save method. If the hidden input field FaxKey was empty I would consider it an add else It would be a edit. I would then get the record as an object using scatter name or scatter name blank. I would then update the record object based on what was in the Request object through what I had hoped was a small for next loop something to the effect of :

For x = 1 to ItemsInRequest
lcItemName = Request.Form.Item(x) ???
lcItemValue = ???

loRecord.lcItemname = lcItemValue
next

Send loRecord to the actual table.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform