rowmoin / jquery-jsonp

Automatically exported from code.google.com/p/jquery-jsonp
0 stars 0 forks source link

callback not excuted #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a showPrice function ( as jsonp callback function )
 e.g 
        function showPrice(data){
                alert( 'ha' );
        }

2. make a jsonp call  
        $.jsonp({                     
          "url": "http://localhost/testjsonp.php",
          "callback": "showPrice",
          "callbackParameter": "callback"})

3. run the page, callback not excuted 

What is the expected output? What do you see instead?
should get alert from the callback function ( showPrice )

What version of the product are you using? On what operating system?
FF3.5, Jquery1.3.2, jquery-jsonp-1.0.4.min

Please provide any additional information below.

Original issue reported on code.google.com by shallway...@gmail.com on 6 Jul 2009 at 6:03

GoogleCodeExporter commented 9 years ago
$.jsonp({                     
          "url": "http://localhost/testjsonp.php
          "success": showPrice,
          "callbackParameter": "callback"})

Please read the API documentation carefully, the "callback" option is to set a 
specific 
callback name "in the url" and has nothing to do with the naming of the 
function used 
as you success callback.

Original comment by aubourg.julian on 6 Jul 2009 at 2:57