Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looping asp.request.forms object
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00198536
Message ID:
00198580
Views:
19
>>>What is want to do is this....
>>>
>>>FOR i = 1 TO orequest.forms.count
>>> lcfoxname = orequest.forms(i).name
>>> IF TYPE(lcfoxname) # "U" && Fox knows what this is
>>> &lcfoxname = orequest.forms(i).item()
>>> ENDIF
>>>
>>>
>>>
>>>ENDFOR
>>>
>>>Is this posssible? I thought I would ask before I lost all of my hair testing and debugging ASP.
>>
>>I'd avoid the macro expandsion by:
>>
>>
FOR i = 1 TO orequest.forms.count
>>   IF TYPE('orequest.forms[i].name') # 'U'
>>      STORE orequest.forms[i].item TO (orequest.forms[i].name)
>>   ENDIF
>>ENDFOR
>>
>>or, better:
>>
>>FOR EACH form IN oRequest.forms
>>   IF TYPE(form.name) # 'U'
>>      STORE form.item TO (form.name)
>>   ENDIF
>>ENDFOR
>>
>>>Thanks,
>>>John S. Huddleston
>Is this the correct way to use request.forms ?

Probably not; what exactly are you trying to do? The syntax is correct, assuming that the forms collection contains a member item, but if Item is a collection, as I'd expect, it's not passing you a string. See my follow-up message, since you're trying to stick an object where vfp expects to find a character string.

Clarify what you want to do.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform