Do you have a sample link we can look at? Also, you've specified a return type of JSON (dataType: "json"). Are you returning JSON from the server? I would assume not since you're trying to insert your results directly into a div. (append(response.rname);)

Rey..


-----Original Message-----
From: interarnett [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 12, 2007 6:42 PM
To: jQuery (English)
Subject: [jQuery] cf ajax example


I have created a simple app screen based off of the example/tutorial
on jquery website for coldfusion and ajax.

I have firebug running and have stepped through the entire process.
All processes seem to be working correclty, I fill a value in a
formfield and onblur a query is invoked and dataset is returned.
(Which i can see in console in firebug...)

I am just unable to get the values to display back on my screen in the
section defined via style sheet.

There is a parameter for success in ajax call.
Success never happens it only comes back and says that there is an
error but do not know how to trap for error...

Any help will be greatly appreciated....

here is javascript
//<script type="text/javascript">
//                $(document).ready(function(){
//                              $("#idm").blur( function() {
// var formval = { idm:$(this) .val()};
//                                      $.ajax({
//                                        type: "POST",
// url: "req_processor_employee.cfm",
//                                        dataType: "json",
//                                        data: formval,
//                                        success: function(response){
//                                              $
('#contentdiv').empty().fadeIn(2000).append(response.rname);
                                                }
                                        });
                                });

                  });
//        </script>

sytle sheet
<style type="text/css">
body {font-family: Arial, Helvetica, sans-serif;}
  #databox { border: 1px solid Gray;
                 margin:30px auto 0px auto;
                 padding: 10px;
                 width: 200px;}
        #contentdiv { color:red; font-size: 30px;  margin-top: 10px;}
</style>

form field

<td width="45%">
            <div id="databox"><input name="EMPLID" type="text"
id="idm" maxlength="6"><br>
            <p id="contentdiv">&nbsp; </p>
            </div>
            </td>




Reply via email to