Re: JSONP & getJSON Problem Programming Web Development by Airshow …Things are made difficult in the jQuery documentation in that JSONP is detailed under "jQuery.ajax()" with only…The format of the server's response is JSON, not JSONP. [*]The response of your same-domain call is handled … [ICODE]callback=?[/ICODE] in the url. [/LIST] With JSONP the callback function, as specified in the URL, should be… Re: JSONP & getJSON Problem Programming Web Development by eawade …, as I was able to properly encode the data into JSONP on the serverside. That being said, I'm still having… I'm having it. Note that below is what the JSONP looks like: ?({"posts":[{"post":{"name… Re: JSONP and passing a URL value as a parameter - Chrome Extension Programming Web Development by Airshow That's probably a silly question if it's a third party server. On the other hand, are you certain that the server is set up to return jsonp (with the function call wrapper), not json. After all, the request asks for [ICODE]format=json[/ICODE], not [ICODE]format=jsonp[/ICODE]. Re: JSONP and passing a URL value as a parameter - Chrome Extension Programming Web Development by Airshow I thought [iCODE]callback=?[/iCODE] was associated with jsonp, not json. Re: JSONP and passing a URL value as a parameter - Chrome Extension Programming Web Development by eawade Hi Airshow, I apologize for any confusion caused by the title. I mentioned JSONP because I'm doing cross-domain scripting. Re: JSONP and passing a URL value as a parameter - Chrome Extension Programming Web Development by Airshow OK, don't apologize, my bad. I forgot that the presence of [iCODE]callback=?[/iCODE] gives [iCODE].getJSON()[/iCODE] JSONP behaviour. Have you remembered to wrap your json response in a function call, eg.: [CODE] echo $_GET['callback'] . '(' . json_encode(.....) . ');' [/CODE] [B]Airshow[/B] Re: Why does jQuery disable the cache by default when requesting JSONP? Programming Web Development by Airshow … for remote-domain requests. Although the section for `dataType:'jsonp'` doesn't include the same note, I rather imagine…then for me it logically follows that, AJAX requests for `jsonp` and `script` should have caching set to `false` … the answer is historical - ie that jQuery added script/jsonp requests some time after the default of `true` was … Why does jQuery disable the cache by default when requesting JSONP? Programming Web Development by Dani I have an API that supports both JSON and JSONP. Obviously, being a data provider, I want the people who… feature: >cache (default: true, false for dataType 'script' and 'jsonp') Type: Boolean If set to false, it will force requested…out of its way to force a cashbuster when requesting jsonp? Is there a technical/philosophical reason to cachebust… Re: Why does jQuery disable the cache by default when requesting JSONP? Programming Web Development by pritaeas … (dataType) it says this: > "jsonp": Loads in a JSON block using JSONP. Adds an extra "?callback=?" to… line: > cache (default: true, false for dataType 'script' and 'jsonp') only refers to the default setting, when omitted. As for… Getting incorrect response in JsonP Programming Web Development by Sanjay_6 …ajax({ type: 'GET', url: 'exec.php', dataType: 'JSONP', data: {code : code}, success: function(data) {…}, // When Service call fails responseType: "jsonp" }); Here's my json callback code … Re: Why does jQuery disable the cache by default when requesting JSONP? Programming Web Development by Dani I think you're misunderstanding. I'm asking why jQuery has not to cache as the default for jsonp even though it has caching as the default for all other get requests. Re: Why does jQuery disable the cache by default when requesting JSONP? Programming Web Development by LastMitch >jQuery has not to cache as the default for jsonp I feel you might have read this before but if not read number **#5**: http://webdesignledger.com/tips/9-jquery-mistakes-you-shouldnt-commit WCF - JSONP Content-Length Issue Programming Web Development by Aesculapius … are to be made cross-domain so I'm using jsonp. The problem I'm having occurs both on the same… JSONP & getJSON Problem Programming Web Development by eawade This is driving me crazy. I wrote a php api file and stored it on my server. When I run the url directly the JSON results are perfectly echoed to the screen, with no problem. However, when I attempt to access the results from another domain (e.g. Cross domain) I can not get the values to show. The screen is still blank. I hope this is making sense.… Re: JSONP & getJSON Problem Programming Web Development by Airshow eawade, Suggest you move away from $.getJSON() and use $.ajax() instead. $.getJSON() is a shorthand method. $.ajax() gives you full control, including the ability to specify an error handler to give you better chance of seeing what's going wrong. $.ajax() is very well documented in the jQuery documentation. Personally, I only ever … JSONP and passing a URL value as a parameter - Chrome Extension Programming Web Development by eawade Ok, this is my final tango with this. Below I've listed the code. I'm able to get the value of the url and display it on screen for the current (active tab) in Google Chrome. Now all I have to do is pass that value as a parameter in the URL via JSON. My processing file resides on a our remote server - in php. Everything I've done with respect to … Re: JSONP and passing a URL value as a parameter - Chrome Extension Programming Web Development by Troy III > Ok, this is my final tango with this. Below I've listed the code. I'm able to get the value of the url and display it on screen for the current (active tab) in Google Chrome. Now all I have to do is pass that value as a parameter in the URL via JSON. My processing file resides on a our remote server - in php. Everything I've done with respect … Re: Why does jQuery disable the cache by default when requesting JSONP? Programming Web Development by LastMitch >Obviously, being a data provider, I want the people who request my data to cache it. Since JQuery mention about Cache and it won't let you do that. You just want members to used your data to cache? How about saving the cache in the database then used JQuery Ajax cache? I think that consider using your data to cache. I don't know it's … Re: Why does jQuery disable the cache by default when requesting JSONP? Programming Web Development by Dani Yes, I know that's how it works. I was hoping someone on DaniWeb could tell me why instead of having to go to the jQuery forum :) Re: Why does jQuery disable the cache by default when requesting JSONP? Programming Web Development by Dani Thanks Airshow! That makes perfect sense :) Re: Getting incorrect response in JsonP Programming Web Development by pritaeas Can you show the rest of the PHP code. It looks like you're outputting the 2311 too. How to access variable of same page Programming Web Development by shilu2 ….data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N…url)? "&":"?")+(e.jsonp||"callback")+"=?");else if(!e….data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType….test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data… OAuth 2.0 Implicit Flow with the DaniWeb API Programming Web Development by Dani … us to receive a response in JSONP format, as opposed to a typical JSON string. JSONP, or padded JSON, wraps the result… AJAX documentation](http://api.jquery.com/jQuery.ajax/) related to JSONP for more information, but the details are out of the… window.open works but $.ajax fails Programming Web Development by scottholmes … ajax fails, thus: [CODE]$.ajax({ type: 'get', url: URL, dataType: 'jsonp', error: function() { alert("Some error"); }, success: function() { alert… with 'get' and 'post' for type and with 'json' and 'jsonp' for dataType. No joy. I would appreciate any thoughts on… Cross Domain Ajax data Programming Web Development by umandajayo …'); }; $.ajax({ type: 'GET', url: url, data:{todo:"jsonp"}, dataType: "jsonp", crossDomain: true, cache:false, success: success, error: error… jQuery json parse and stringify don't work Programming Web Development by 9tontruck …using jQuery. Here is my code: $(document).ready(function() { var jsonp = '[{"filename":"4x6_flower.png","count"…;,"height":"820"}]}]'; var obj = jQuery.parseJSON(jsonp); document.body.innerHTML = ""; document.body.appendChild(document.… Re: jQuery json parse and stringify don't work Programming Web Development by diafol Does taking off the first and last square bracket of jsonp help? Remove surrounding quotation marks Programming Software Development by jculverwell I am attempting to write a JSONP application and think that it is not working because the … Dealing with remote cookies Programming Web Development by zizuno … end I will do a proxy connection via PHP and JSONP the data to the JavaScript. Now what I am curious… Proper way to do JavaScript-based OAuth Programming Web Development by Dani … made a <a href="/api/documentation">JSONP request</a> with jQuery!</h1>'); }); } } }); } }); $('#click…