Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    JavaScript


Ajax :: JQuery GetJSON Doesn't Send Cookies

i am including JS on domain1 form domain2

<script type="text/javascript" src=""></script>

that script doesn onload and on button click a JSONP request to domain2

$.getJSON( '',
if ( data ) processData( data );

and then displaying the data on domain1. So here is my problem: The getJSON request doesnt send cookies to the domain2. The weirdest thing is that it does send the cookies half a day and the other half not. :-) This is how the request looks like when it doesnt work:


View 2 Replies (Posted: Aug 3 at 17:33)

Sponsored Links:

Related Forum Messages For JavaScript category:
Ajax :: Request Guaranteed To Send Cookies?
I've just tested this and it seems that Ajax requests send the cookie header from the browser to the server each time. Is this a guaranteed behaviour which I can rely on, or is it something which may or may not happen?

Posted: Jul 2 10 at 5:17

View 1 Replies!   View Related
Ajax :: Jquery GetJSON() Doesn't Work When Trying To Get Data From Java Server On Localhost
The whole day yesterday I've been trying to solve this but it's proven to be very challenging for me. I'm trying to use this JS to get information from a java application I wrote.

$(document).ready(function() {
$.getJSON('http://localhost/custest?callback=?', function(json) {

The Java application uses httpServer and is very basic. When I access the page [URL] with Firefox, the browser shows me the server is sending me json data and asks with what to open it with, but when I try it from a webpage using the JS above it doesn't work. The getJSON call is not successful, the alert("ok") doesn't popup at all. If it replace "http://localhost/custest?callback=?" in the JS with [URL] everything works fine. An interesting thing is that if I send malformed JSON from my java server Firebug gives an error and tells me what is missing from the JSON so that means the browser is receiving the JSON data, but when I send it a correct JSON string nothing happens, no errors, not even the alert() opens.


Posted: May 24 10 at 8:58

View 2 Replies!   View Related
JQuery :: Send Data Via AJAX For JQuery.ui.sortable But It Doesn't Send Everything
I'm trying to build an array structured like

[num, num num]],


the problem is that I'm trying to send the var 'x' as data in an AJAX update function that jQueryUI uses for sortable. And it needs to be the array structure above. =

I'm using the [URL] kind of sorting.

So, normally I would just to $j(list selector).sortable('serialize')

but because I have two lists I tried this $j(selector1,selector2).sortable('serialize') which is what you do for sorting two lists as in the example. But when the ajax request is made, it only sends the updated list. Which would be fine if I had tons of processing power. but I need the list, and which list it belongs to.

Whats really interesting is that my server says the war is getting sent as


but that doesn't even include the section_id
I should be getting something similar to

["141", ["203", "206", "204", "205"],
"142", ["215", "207"]]

(numbers and structure from chrome when I run the script from the link on my webpage)

my sortable js:

$j("<%= @sortable_contents %>").sortable({
connectWith: '.section-content',
axis: 'y',
zIndex: 1003,


Posted: Aug 25 10 at 18:21

View 1 Replies!   View Related
Cakephp - Jquery :: JSOn Ajax - Call Doesn't Send Any Data After Some Idle Time?
Nevermind, I just figured out that CakePHP had to re-set the cookie because it expired. If you experience the same error, just check the return header with Firebug => "Set-Cookie".I have a jquery function which calls a CakePHP Function with Ajax and returns it as JSON:

$('#categories a').live('click', function() {
catid = $(this).attr('id');
load_notes(catid); [code]....

"load_notes" is called after the document is ready and if I click on a Category-Link. This works fine when I just loaded the page or when I click on a category-link after a few minutes. But when I wait for around 30 minutes and fire the function, nothing is returned (therefore the notes can't be displayed).Only if I reload the page, the function works fine again.I usually get a JSON-Array as a response (checked with Firebug) but when the error occurs, I only get:

"j is null" handleError(a=Object {
url="/notes/load_notes", global=true,
more...}, b=XMLHttpRequest {[code].....

Posted: Feb 8 11 at 19:17

View 1 Replies!   View Related
Can't Send Cookies Using XMLHTTP
I'm writing a script to send posts to a web forum. I find that
MSXML2.XMLHTTP object could communicate with web server but I can't make
it send cookie which is needed for post authentication. I have searched
google and read some articles including: Code:

Posted: August 7th, 2006

View 1 Replies!   View Related
Jquery :: Send List Of :selected From Multiple Selectable Select Via GetJSON
I have a list of dates in a multiple select elemental, and I need to send the list of selected dates to server for handling. The jQuery is going haywire giving me a continuous increase in both memory and cpu usage, which I dont understand as running the haywire part alone is fine.

<select id="my-dates" name="my-dates[]" multiple="multiple" size="5">


Posted: Jan 20 11 at 11:40

View 1 Replies!   View Related
Jquery :: GetJson Send $_GET Var To Retrieve Correct Json String?
I have this at the top of the getjson url

if(isset($_GET['template']) && $_GET['template']=="blue") {
} else {


I don't see what I've possibly done wrong, and I don't know how to test the $_GET output at the json generator.php because its called, well, trough json :

What can possible be wrong? The above does not work as expected because I suspect the template var is not being correctly submited, since I always get the "else if" result and never a valid match

Posted: Apr 19 at 6:42

View 2 Replies!   View Related
Internet Explorer 7 - JQuery.getJSON() Doesn't Work On IE7
This is the line i am trying to execute and it does not work ( i know .. it is annoying statement ):

$.getJSON('/index.php/list/' + query , target.populate );

It works like expected on all browsers but IE7. After inspecting server access logs, i conclude that request is never sent.

Same code works fine on IE9 and using full URL had no effect.

progress so far

replacing $.getJSON() with $.ajax(): [ no effect ]
changing stuff in $.ajaxSetup(): [ no effect ]

additionally, the code of $.ajax() looks like this .. maybe i did it wrong :

url: '/index.php/list/' + query,
dataType: 'json',
cache: false,
data: null,
success: target.populate

Posted: Sep 16 at 10:06

View 2 Replies!   View Related
JQuery :: GetJSON Doesn't Work - No Error Messages / Sort It?
I can call a rest service I have running in a 'test' environment fine from other tools (or directly in browser for that matter).

When I call using jQuery nothing happens.

No errors, no javascript messages. Nothing. [code]...

Posted: 01-Oct-2010

View 9 Replies!   View Related
Jquery :: Codes Inside .getJSON() Function Doesn't Fire
There lots of questions about getJSON but I couldn't find an answer to my problem. I have this simple code:

$.getJSON("ashx/GetVote.ashx?id=" + recordID, function (data) {
$("#kg-VoteAvg-" + recordID).html(data.VoteAvg);
$("#kg-VoteCount-" + recordID).html(data.VoteCount);

In FireBug console, I see that a request happens.Parameter "id=2" is sent. That is recordID is 2.A valid JSON returns: {VoteAvg:'1', VoteCount:'1'}I also verified via FireBug console that $("#kg-VoteAvg-" + 2).html(1); works.However, my code lines inside the function neither fires nor gives an error. Where do am I doing wrong? I can use .ajax() function but wondering why my alert or others in .getJSON() function doesn't work.

Posted: Dec 13 11 at 21:50

View 1 Replies!   View Related
Callback Function Doesn't Work When Using GetJSON
This is the code that I am using, When I write the link into the browser (I.E. or Mozilla) it is working like (MyFunc({"memes":[{"source":"http://www.knall......), but when I try to run it as HTML file I have a error in status Bar.

<style>img{ height: 100px; float: left; }</style>
<script src=""></script>


Posted: May 14 10 at 22:57

View 4 Replies!   View Related
JQuery :: Callback Function Doesn't Work When Using GetJSON Function
I am trying to use the getJSON function in jQuery to import some data and trigger a callback function. The callback function doesn't run. However, if I try the same thing with the get function, it works fine. Strangely, it works with the get function even when I pass "json" as the type. Why is this happening? I tested the following file in Firefox 3 and IE 7:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title>ajax test</title>
<script type="text/javascript" src="/jquery-1.3.2.min.js"></script>

Posted: Apr 20 09 at 22:36

View 7 Replies!   View Related
JQuery :: Uploadify Doesn't Send Any Request To Upload.php / Fix It?
I have following problem with uploadify and I'm planing to use iframe. I already lost few hours without any result. code...

My upload.php works perfectly. I have tried my upload.php script just to see if it will work or not and it did work as expected.

I decided to add a small code to create a log file just to see if my upload.php has been executed or not. If I don't use checkScript, then there are no logs. If I use checkScript then there are logs and I can see uploadify sending request with using POST to my upload.php script with FireBug.

Even though it is not sending any request to upload.php, it is still showing Success!! alert.

Simply 'script' doesn't send absolutely any request to upload.php but strangely if I use upload2.php (file doesn't exist) then it gives me 404 error.

I'm not sure if this is a bug but it kinda seems to me like a bug considering I did follow documentation, my upload.php works as expected, my folder permissions are 777 still doesn't work.

I will be glad if anyone could point out what is this problem and how to solve it.

Posted: Dec 11 11 at 2:39

View 1 Replies!   View Related
Jquery :: Create Cookies With One Script And Access The Same Cookies With Another Sccript Yui / Or Anything
Is it possible to preserve and get cookies which have been set by a different script? lets say we are migrating the front end fucntionality from jquery to yui or some other js library, can I get the cookies which were saved earlier on the same domain.

Posted: Jan 8 11 at 0:40

View 1 Replies!   View Related
Jquery :: Post Method To Send Array To Php Doesn't Work
I was looking over the web how to send Java script array, like this one:var array = ["thing1", "thing2", "thing3"];"To php file on my server.Then I came across jQuery .post() method, but when I use it my php file remains empty![code]But I have no much experience with php and I don't know should php be empty or have some code to retrieve array! All I want is to store javascript array on server file so I can read that array again on page load.

Posted: Jul 3 11 at 12:28

View 1 Replies!   View Related
Jquery :: GetJSON And Ajax Not Working In IE
I am trying to get getJSON working on my IE, but I read that IE doesn't support it that well. So I decided to use ajax instead. My code is:


Posted: Nov 27 at 21:32

View 2 Replies!   View Related
Ajax :: CrunchBase API And JQuery GetJSON
I am trying to simply send an alert with a "name", but It doesn't seem to work.
$(document).ready(function() {
$.getJSON("[URL]", function(data) {
alert("Hello: " +;

Here is what the JSON contains:
{"crunchbase_url": "[URL]",
"permalink": "google",
"name": "Google"}

Posted: Dec 2 10 at 3:10

View 2 Replies!   View Related
Jquery :: Rails 3 Form_tag W/ Remote Doesn't Send Submit Details?
This form works 100% when using the normal non-remote request.However when I set remote => true it is not longer sending the submit value.Should I do this completely differently, or is there something I'm missing?

<%= form_tag [voteable,], :remote => true do |f| %>
<strong class="votes_balance"><%= voteable.votes_for - voteable.votes_against %></strong>
<%= submit_tag :up, { :name => "thumb_direction", :class => "vote_up" } %>[code].....

Posted: Feb 1 11 at 14:51

View 1 Replies!   View Related
Jquery :: $.post() Doesn't Send Data As Json But As X-www-form-urlencoded Instead
This one is really weird. I've multiple $.post() in the code but there is one dunno why sends the json parameters as x-www-form-urlencoded instead and therefore doesn't work. Here's the code:

$.post("/Route/SaveTransportProperties", { properties: JSON.stringify(propArray), currTravelBox: JSON.stringify(travelBoxObj), accessToken: getAccessToken()}, function(data)

The XHR looks like this in Firefox: why is this happening? I also enforced the type as 'json' but doesn't work either.

Posted: Apr 3 at 12:53

View 3 Replies!   View Related
Socket.send() Doesn't Work On Opera 11.10
I'm using with Opera 11.10.

I have seen that socket.send() doesn't work on Opera 11.10.

ON website I have seen that only Opera 10.61 is supported.

it's strange because the connection went good, and on 'message' event is fired without problem... the problem is only to send messages.

Could I do something to use with this version or do I have to wait new update?

Posted: Jun 4 11 at 23:05

View 1 Replies!   View Related
JQuery :: Use $.getJSON For Making An Ajax Call?
I use $.getJSON for making an ajax call. This is the code.


The data is sent to the server, I also get a response from the server. My firebug shows the response as the value I sent from the server.

But the callback function is not called... The alert never happens

Posted: 12-Jan-2011

View 2 Replies!   View Related
JQuery :: $.ajax And $.getJSON In Not Working In Mozilla?
I'm using $.getJSON to get data from WCF service in the form om json. this is working fine in IE7 but in mozilla it returns nothing. My code is

function(data) {

this code returning me the list of countries in json format. so what to do in the case of mozilla..

Posted: 27-Aug-2009

View 1 Replies!   View Related
JQuery :: Ajax Call In Firebug When Using $.getJSON?
Can you see an ajax call in Firebug when using $.getJSON? If so, does it return the jsonobject correct? Maybe there are some enters or something in front of the json?

Posted: 09-Dec-2009

View 4 Replies!   View Related
Ajax :: Get Data Out Of JQuery GetJSON Callback?
I need to get the JSON object data out of the callback function so that I can process it later in page, not within the callback as I am now. It must be obvious to everyone else as I can't see anything written about it. Can anyone tell me how to do it? Here is my code:

<script type="text/javascript" src="/site_media/js/jstree/_lib/jquery.js"></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
function initialize() {
var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
var myOptions = {

Posted: Sep 11 10 at 3:34

View 3 Replies!   View Related
Copyright 2005-08, All rights reserved