theworpler
asked on
Silly question I think but....
I have a form which submits a few controls to an action
page.
This page calls cfhttp and I wanna see exactly what is being passed to the cfhttp tag.
Unfortunately I can't pop up a javascript alert showing what the action template converts the form input to
just before the call to cfhttp...as the whole page must be produced first.....is that correct?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
I'll try those.
I was just being lazy and wanted to bung some js
at the head of the action page.....
I'll try those.
I was just being lazy and wanted to bung some js
at the head of the action page.....
ASKER
Thanks all!!
<CFSET formdata = "">
<CFLOOP list="#form.fieldnames#" index="i">
<CFSET formdata = formdata & i & ' - ' & Evaluate('form.' & i) & '\n'>
</CFLOOP>
<SCRIPT>
alert('#formdata#');
</SCRIPT>
If you want to see exactly what is being passed to the action page without firing the cfhttp tag you can do the following:
<CFOUTPUT>
Form data:
<CFLOOP LIST="#form.fieldnames#" index="i">
#i# - #Evaluate('form.' & i)#<BR>
</CFLOOP>
<CFOUTPUT>
<CFABORT>
<CFHTTP...
Spike