Firebug is cool but I also use a reverse proxy called Charles which is 
extremely useful (http://www.charlesproxy.com/)

-----Original Message-----
From: Andy Matthews [mailto:li...@commadelimited.com] 
Sent: Thursday, October 01, 2009 2:39 PM
To: cf-talk
Subject: RE: Debugging jquery post to coldfusion


A really good way to debug jQuery to CF mechanics is to use Firefox and
Firebug. In Firebug you can see AJAX calls. Right click on that line in FB
then select copy with parameters, and paste that into a new tab. It'll store
all of your passed in vars, and let you see what CF is doing.


andy

-----Original Message-----
From: Doug Hyde [mailto:deve...@fusesite.com] 
Sent: Thursday, October 01, 2009 6:32 AM
To: cf-talk
Subject: Debugging jquery post to coldfusion


I am having trouble processing a post to a cf template using a jquery post.
I have set up a template to dynamically evaluate the form fields being
posted - it isn't working, however it uses the following basic syntax:

<cfloop list="#FieldNames#" index="i">
        <cfif i does not contain 'fieldnames'>
        <cfset value = evaluate(i)>
        #i# #value#
    </cfif>
</cfloop>

One of the challenges I find with debugging coldfusion and jquery/ajax
interactions is seeing what is going on. To address this, and as a way to
debug what is going on with the jquery post, I decided to place the above
code in a cfmail tag as follows:

<cfmail to="myem...@someaddress.com" from="myem...@someaddress.com"
server="localhost" subject="Test jquery form post">

<cfloop list="#FieldNames#" index="i">
        <cfif i does not contain 'fieldnames'>
        <cfset value = form[i]>
        #i# #value#
    </cfif>
</cfloop>

</cfmail>

When I post to this template, I find that this doesn't work either? Huh? Can
anyone explain why? The code below does work (I get a message with the
fieldnames and values) so jquery is posting...

<cfmail to="myem...@someaddress.com" from="myem...@someaddress.com"
server="localhost" subject="Test jquery form post">

<cfloop collection="#form#" item="i">
        <cfif i does not contain 'fieldnames'>
        <cfset value = form[i]>
        #i# #value#
    </cfif>
</cfloop>

</cfmail>

Any explanation why the first cfmail example wouldn't work? In the meantime,
I am going to start recoding my template to use the second method. 


 





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326802
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to