Solved

Silly question I think but....

Posted on 2001-06-20
4
125 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
  • 2
4 Comments
 
LVL 4

Expert Comment

by:CF_Spike
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks all!!
0

Featured Post

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Join & Write a Comment

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now