Solved

Silly question I think but....

Posted on 2001-06-20
4
167 Views
Last Modified: 2013-12-24


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?
0
Comment
Question by:theworpler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Expert Comment

by:CF_Spike
ID: 6209555
You can't use Javascript to show what the form is sending if you want to stop processing of the page before the CFHTTP tag. If you don't mind the cfhttp being fired then you can do the following:

<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
0
 
LVL 5

Accepted Solution

by:
Yog earned 50 total points
ID: 6209661
Otherwise you can try executing the other page (cfhttp page from this page , return some parameter if your condition is met, and alert them in the same page

0
 

Author Comment

by:theworpler
ID: 6209728
Thanks
I'll try those.

I was just being lazy and wanted to bung some js
at the head of the action page.....
0
 

Author Comment

by:theworpler
ID: 6211118
Thanks all!!
0

Featured Post

 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question