Post parameters from AJAX request undefined in form scope in ColdFusion

后端 未结 2 1305
没有蜡笔的小新
没有蜡笔的小新 2021-01-22 17:54

I am working on a ColdFusion 8 training application where I\'m making some AJAX requests (without any libraries such as jQuery) to support a very basic CRUD application. The h

2条回答
  •  庸人自扰
    2021-01-22 18:39

    There absolutely is a FORM scope when you do an Ajax post to a CFC.

    This example POSTs form data via Ajax to a CFC function with no arguments and returns the JSON format of the FORM scope. Yes, you should have arguments to document, specify required/not required and data type, but they're not mandatory.

    Is there any reason you aren't using jQuery? It would probably make your life much easier.

    There must be something wrong with how you're sending the form data to the Ajax call. If you use FireBug to watch your Ajax calls, you can see the POSTed parameters.

    HTML

    
        
            Ajax POST to CFC
            
            
    
                                     
                  
提交回复
热议问题