Learn it well - once you get this code working, go through every part of it ;)
The problem on the jQuery side was the nesting. When you assign a function to an event, everything needed to handle just that event should be encapsulated: First, set blur for the Principal element. Post posts the form field "principal" in your code below so you should be looking for form.principal on the other end. The last part of the the post function is either an anonymous function (function (){ }) or a function call without the () - in this case, since it looked like you were trying to get both inputs to update the same element, it makes sense to pass the results of each post back to a common function. Same deal on the interest calc - it's passing the form field "interest" back to CF so you should be looking for form.interest if you need a different validation style. Once you get this going, open up firebug and look at the console tab. every time you blur one of those fields you can see the ajax call. open it and look at the response tab and make sure you're getting what you expect - you did have a <cfif value = principal> which cf chokes on (should be value is|eq principal) You could be getting errors on the CF side and you won't see them unless you're looking at the response. <script type="text/javascript"> $(document).ready(function(){ $("#Principal").blur(function(){ $.post("callpage_Validate_Mortgage_Inputs.cfm", {principal:$("#Principal").val()}, handleCallback) }); $("#Interest").blur(function(){ $.post("callpage_Validate_Mortgage_Inputs.cfm",{interest:$("#Interest").val()}, handleCallback) }); }); function handleCallback(data) { $("#Result").empty().append(data); } </script> Hope this helps... Rick Faircloth wrote: > > Thanks for the advice on Firebug and the debug code, Daemach. > > I've been using it for a few days, but haven't learned it well. > It has been good about notifying me of syntax errors, however! > > Rick > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Daemach > Sent: Tuesday, March 13, 2007 11:51 PM > To: discuss@jquery.com > Subject: Re: [jQuery] Ok... one last effort to make this work... help! > > > I second that - if you're not using firebug, you should drop everything > else > until you get familiar with it (seriously). Use console.log(), > breakpoints, > watches, and the net tab or console for debugging ajax calls. You can see > what data is going to and from the server on every call. > > You should also add: > > jQuery.fn.debug = function() {if (typeof window['console'] !== > 'undefined'){console.log(this);} return this;} > > to the bottom of your jquery.js file, or create a separate plugin file > with > just this code in it and load it after jquery. Then you can insert it > into > jquery chains to see the results of selectors in the console. > $("p").debug().addClass(......).....etc. > > > > Rick Faircloth wrote: >> >> Thanks, Paul... I'll start working on that! >> >> Rick >> >> -----Original Message----- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On >> Behalf Of Paul >> Sent: Tuesday, March 13, 2007 11:25 PM >> To: 'jQuery Discussion.' >> Subject: Re: [jQuery] Ok... one last effort to make this work... help! >> >> Two broad suggestions: First, get familiar with Firebug; in addition to >> just >> js errors its messages will alert you to 404 errors (which you would have >> caused by calling a file in the wrong folder) as well as 500 errors >> (which >> are the result of CF errors) and save you a lot of time wondering why >> ajax >> isn't working. Second, poke through the tutorials on jquery.com, which >> explain the basics and will turn you on to the possibilities. >> >> Now back to your question, assuming you're like me and develop in >> iterations, I would simply start by copy/pasting the .blur() binding for >> each field: >> >> $("#Some-Field-ID").blur(function(){ //assign a blur event to the input >> $.post("callpage_Validate_Mortgage_Inputs.cfm", >> {some-variable-name:$("#Some-Field-ID ").val()}, function(data){ >> >> When I start by taking the easy way out like this, I typically begin to >> see >> how it works and realize along the way how to make it more tidy. >> >> You'll also need to handle the POST variables that will be different on >> the >> CF side; assuming it existed in v 4.5, CF's structKeyExists(form, >> "some-variable-name") function would do the trick. >> >> And of course, the usual disclaimer: there are better ways to accomplish >> this task (Jorn's plugin being one of them), but this will get you >> started. >> >> -pm >> >> >> >> >> >> _______________________________________________ >> jQuery mailing list >> discuss@jquery.com >> http://jquery.com/discuss/ >> >> > > -- > View this message in context: > http://www.nabble.com/Ok...-one-last-effort-to-make-this-work...-help%21-tf3 > 399722.html#a9468102 > Sent from the JQuery mailing list archive at Nabble.com. > > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/Ok...-one-last-effort-to-make-this-work...-help%21-tf3399722.html#a9468469 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/