Hi folks, I've got an issue with the getJSON command. It's all
working fine apart from if the map data contains < followed by a
letter. If there is a space in there, "< a" for example, or a number
"<1" it is fine, but with "
Hi guys,
I write a web page that retrieve the data from a JSON formatted file
but when this fiel doesn't exist I can't see any error;
how I can handle this situation
thanks
Hi
In the code below the second alert is executed before the first one
making it show the "empty" content, and not the result from the .json
file. Why, and how can I make it work???
-
getjson.html file
--
Hey all:
I've read the docs and googled the heck out of this, but not seeing what the
problem is.
I'm trying to get some data from the server via the getJSON() method. I do
see a response in firebug and I've validated the response data at
JSONLint.com. However, the callback function simply will
I am using getJSON to get results from a different domain and i wanted
to get _some_ object back when calling getJSON so that i can insert
some variables into the callback scope.
Basically, what i wanted to do was this:
var new_json = $.getJSON(url, function(data) {
I am trying to use getJson to get json response from a remote site,
the remote site expects Accept : application/json.
Some how all my requests when observed using firebug shows Accept : */
*
I also tried the exmaple http://docs.jquery.com/Ajax/jQuery.getJSON
Although it returns json data , but th
Hi Guys,
I m trying my hand on getJSON
I am able to see response through fiddler
Please let me know what i am missing
This is my function
$(document).ready(function() {
$.getJSON("http://127.0.0.1:8001/category/1?
format=json&callback=?",
function(json) {
alert(json.catego
I'm employing the getJSON call in a site I'm working on, but I'm
having a problem with the response not coming through if it is too
large.
I've read a number of posts talking about the request string being too
large (forcing a user to use POST), but what about the response string
being too large?
Following getJSON works fine but I need to replace "presentations with
a variable "getSlides" tried a lot of different ways with a variety of
errors no matter what I've treid
var getSlides = $(this).attr("href");
$.getJSON("photoList.js", function(slides){
$.each(slides.pr
I have a problem with the getJson callback in jquery. Here's the
scneario. The user enters a query online and hits 'execute'. At this
point make a call to a java servlet that returns the results of the
query. The results include one row contiaing the column names which is
followed by multiple rows
This works fine:
$.getJSON("http://localhost:59396/xxxWeb/
CarouselHandler.ashx?action=getproducts&ids=" + ids,
function(data) {
carousel.size(allProductIDs.length);
if (numberOfImagesLeftToShow <
numberOfImagesToDisplay) {
http://docs.jquery.com/Ajax/jQuery.getJSON
I don't get what it means in this example:
Load the JSON data from test.js, passing along additional data, and
access a name from the returned JSON data.
$.getJSON("test.js", { name: "John", time: "2pm" }, function(json){
alert("JSON Data: " + json.u
I have the following setup on my page inside a function:
$.getJSON("http://localhost:59396/xxx/xxxHandler.ashx?
action=xxxjson",
function(data) {
alert('got here');
$.each(data.items, function(i, item) {
carousel.add(i, mycarousel_decodeEntities(item.ImageTag)
Hi
I am trying to send with getJSON a very long string as parameter:
$.getJSON("/ajax.php",{id:myid, thetext:mytext},myAjaxResult)
where "mytext" - is value from my fckeditor.
If "mytext" value is not so long, everything is going fine, but if it
become a very long, getJSON doesn't work.
How ca
Hi, I'm a newbie trying to understand getJSON callbacks. I have 2 getJSON
calls below. One for flicker which works fine - the alert goes off - but
when I tried my js file, nothing happens. Both files are returning the
exact same JSON data.
I know I'm doing something wrong. Can someone help m
It is possible to have getJSON() grab all of the data pairs and put
them into a js array? Rather than having to know the names of the
data?
Hey All!
I'm using getJSON to do some cross domain long polling. getJSON calls
a PHP script (running lighttpd) and the PHP script waits until a new
message is there, then sends the data out to the waiting getJSON
request.
All works well, but the browser "throbber" keeps spinning while
waiting fo
Hi,
I'am having a bit of a problem with special chars in a getJSON
response which is the result from php and smarty
the file called by the getJSON is something like this:
compile_check = true;
$smarty->debugging = false;
$smarty->template_dir = $CFG->smartydirs . "/templates";
$smarty->
Hello:
I'm trying to use the getJson() with asp.net page (attempting to adapt
jquery in action example to .net):
$(function(){
$('#styleDropdown')
.change(function(){
var styleValue = $(this).val();
$('#detailsDisplay').load(
'getDet
Hi,
I'm trying to get some data as JSON, and want to show a spinning
animation while doing so. I have the following jQuery/HTML:
http://dpaste.com/46873/
The URL I pass to getJSON returns some data e.g. {'data': '123456789'}
and seems to be working properly and returning valid JSON.
I pass a ca
i am trying to load json. but it seems like its not working. nothing
is alerted. supposed to be the case?
$(function() {
$.getJSON("data.js", function (json) {
alert(json);
});
});
data.js
[ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry}, {Value: 3,
Item
I'm trying to display data from a json request into a table.
Table heading disapear when the request finishes and I can't figure out
how to fix it.
Test case is hosted at: http://tinyurl.com/couflx
TIA
Maurício
--
View this message in context:
http://www.nabble.com/getJSON%28%29-response-in
I'm trying to display data from a json request into a table.
Table heading disapear when the request finishes and I can't figure out
how to fix it.
Test case is hosted at: http://tinyurl.com/couflx
TIA
Maurício
Hi,
I amn't able to parse hidden form field data in $.getJSON method,
seems like I am missing something.
Hidde Field:
This is my hidden filed with JSON value which I access in jQuery code,
I ma just storing in a variable videoListJson and getting in the
string format.
Pass the videoListJson i
Sorry if this is a duplicate post - doesn't look like the last one
went through.
I've seen several examples of how to process json data with .each when
the field names come over with json. My data, howver, looks like the
following:
{"aaData": [
["1001-00-1535.000","Tenant Improvements"],
["1001
This is probably a simple problem, but I can't seem to find the fix.
I have three getJSON events that work inside of a tab like form on a
page. I load the page and navigate to the first tab, each tab has its
own getJSON request. The first tabs getJSON does not fire and is
ignored. Then I move to
hello,
I have a file data.inc.json with the variable
{
'video_url':'http://www.youtube.com/v/idididid&hl=de&fs=1'
}
which I open from my javascript by
$.getJSON(" data.inc.json", function(j){ var youtubeurl = j
["video_url"]; });
The value of the variable youtubeurl looks correct (http://
www.
hi,
i do not understand so well how the function getJSON works. i've read the
documentation but i think i miss the point.
i would like to pass some argument/parameter to a php file which in return
gives me som JSON answer.
therefore i wrote the following code:
$.getJSON("lg.php",
{ start: 0, offs
Hi,
I've got an application developed in ASP.NET MVC using jQuery to
handle JSON requests and responses.
I use the following Javascript code to popup a dialog, send off the
request and then move the client back to the page they were on
previously:
if (confirm("You currently have a project open,
hello, i have another question about JSON i received the JSON Objekts
well, so my question is i receive an object like this data.items this
has html in it.
how can i talk to an html object $('#test') that is in the JSON
Object.
do i have to inject the html first by $('#putitthere').html
(data.it
Thanks for your good tips for the json in my multiple ajax call update
boxes question.
now i have another question is there in getJSON some thing like the
beforeSend function in $.ajax ???
or schoult i manage my calls through the $.ajax(options) call with the
dataType "json" ??
what are your op
I have a getJSON call that works fine in FF, but bugs in IE.
I get no data. :(
So i want to see what the plaintext is that's returned in the success
callback..
Using the new 1.3 jQuery, btw..
code:
var rc = $('select#regions_countries')[0];
var rr = $('select#regions_regions')[0];
Hi,
I've got a deadline to get a project working and I'm stuck with a
getJSON call problem.
Here's what's happening. Visitors come to a landing page on domain A
(domaina.com). All of the links and form submits on this page are
coded with a javascript call to a function which calls getJSON on a
c
Hi,
I was trying to get 10 items from the json file. My url in $.getJSON
looks like:
$.getJSON("myjsonfile.json?count=10", {}, function(data) {
$.each(data, function(i, item) {
alert(item.title);
alert(i);
});
});
But the above code returns all 20 items from my file. Wh
I'm making some calls with getJSON on another domain, and the callback is
not firing.
My code is the next:
var url = '
http://localhost:8080/cometd/cometd?message=%7B%22version%22%3A%221.0%22%2C%22minimumVersion%22%3A%220.9%22%2C%22channel%22%3A%22%2Fmeta%2Fhandshake%22%2C%22id%22%3A0%2C%22connect
What am I doing wrong? Im able to submit the request and get a
response, but in Firebug it says invalid label and the alert doesnt
show up.
here is my code:
$("form").submit(function() {
$.getJSON("http://api.nytimes.com/svc/movies/v2/reviews/
search.json?api-
key=c82338627f
Hi all ;)
I'm very new to jquery.
I'm playing with JSON and have some prob to retrieve the result.
Here is the client side:
$(document).ready(function(){
$("#IdEmailField").blur(function(){
alert("FOO1"); --> it works
$.getJSON("test.php", function(json){
I wrote a blog post awhile ago on how to pull in Twitters API via JSON
and consume it with jQuery.
http://damnralph.com/2007/11/20/PullingTwitterUpdatesWithJSONAndJQuery.aspx
As you can see in the comments some people are having problems with
the code I posted. The problem seems to be when you
hi all,
I have a valid json string returned from the server(checks valid, ok
by jsonlint.org) But get a syntax error from the browser.
The call looks like: " $.getJSON(url, addData);'
The returned string looks like:
[{"EMAIL":"[EMAIL PROTECTED]","FIRSTNAME":"Neal","ID":
80235,"LASTNAME":"Dombro
Hi,
I am trying to call a cross domain web service using the following
code. The return data is in XML format. It appears that the call back
function isn't get called. I can not add ?callback=? to the then of
the url. Any thought? Thanks.
$.getJSON("http://www.webservicex.net/WeatherForecast.as
Hi. Can anyone tell me while once I get inside the success function
$j(this) is no longer defined?
Thanks! :)
$j("a.complete").click(function () {
$j.getJSON("https://foobar?my="; + $j(this).attr("title"),
function(data){
if (data.status == "Completed") {
Hi -
I have a simple json file which contains a list of key/path pairs, the
idea is that I will use this to update the links in a nav menu.
In order to do this, I am using getJSON to load and parse the data,
like so:
var pathAssoc = new Array();
var pathVar = null;
function getPathData(){
I have a script that makes a getJSON call to a https located script
while itself being http.
Is there any chance to make this work without browsers giving me a URI
denied error
So http://somedomain.com/ includes a getJSON("https://somedomain/";,
etc
Thanx in advance
Hi
I'm trying to get some JSON content using the $.getJSON function, but
it just won't work!!
I started out using ASP.NET to generate a load of JSON, but decided to
create a simple text file with a JSON string in it instead.
Here's my JavaScript:
$.getJSON("/test.txt", function(data) {
Hi all!
I have a bug with getJSON method in IE6. If I try to get data from
another domain with this method by onready method everything is fine
and it's returns me a normal json response, but if I try to reexecute
function with getJSON method by clicking link I have no response from
the server. Al
Hi all,
I think there may be a bug with the getJSON callback function. See
http://www.sanchothefat.com/dev/jquery/json/
An alert should show and the body should turn blue if it's successful.
Using firebug you can see it gets the file. I don't know what's wrong.
MIME type maybe?
Cheers,
Ro
I am trying to implement a related selects. When the user chooses a
client 2 other boxes get populated. When the document is ready I add a
change event to the company select box. When the company is selected
it fires off 2 methods each of which populate the other select boxes.
A look into firebug
Hi,
I have a PHP script that returns a JSON object with one property and
one value.
If I use the PHP file on my local web server the following code works:
$.getJSON("myphpfile.php", callback);
function callback(data) {
alert(data.prop);
}
This produces the alert which contains the correct da
Hi all,
I have a newbie question.
I'm getting a c# string in JSON format and I would like to pass it
to jQuery
$.getJSON("jsondata.js", dataReady);
However, the getJSON's first parameter takes a physical file, is
there anyway I can send string to the func
Hello group. I changed my web browser from FF2 to FF3 Beta. I develop
a Catalyst application with jQuery and im almost done until changed
the browser. Now all my functions that using getJSON fails with no
callback. The script hits the server and receive response, but
callback cant be executed. I c
Hey folks,
I'm trying to work on some cross-site stuff, and I'm using JSON between
the domains to transfer the data.
In my below code, the code fires the .getJSON, and I can see the JSON in
my firebug scripts tag, but the callback is not getting fired:
LoadContent = $.klass({
initialize: fu
Hi everybody - new to both this group and jQuery, so please be
gentle ;)
I have some code which roughly looks something like this:
$(".container ul > li > a").click(
// only do the JSON if the a isn't followed by a DL
if(!($(this).next("dl").length)){
$.getJSON("j
pictures of cats show but Ican't get response function to alert when
pointing to an ASP page. ASP page does render the sample json
response listed below
http://www.w3.org/TR/html4/loose.dtd";>
$(document).ready(function(){
$.getJSON("[jQuery] $.getJSON doesn't work on Vista PC while calling remote server
Hi guys,
if tried the following where usercontacts.j is in my localhost pc
windows vista (tomcat6) and alert showed like [object object] mean there's
some object in json argument:
$.getJSON("usercontacts.js", function(json){
alert(json);
});
so when I changed to remote locati
Hi ,
I want to get the json data from the youtube api (http://
code.google.com/apis/youtube/developers_guide_protocol.html).
My code is like :
url="http://gdata.youtube.com/feeds/api/videos?format=1&vq=cat&start-
index=10&max-results=20&orderby=viewCount&alt=json";
$.getJSON(url,callBackFucntio
I've been receiving error status 'parsererror' while processing json
request. How can I resolve this?
Snippet:
$.ajax({
url: "../filter/filter.json",
dataType: 'json',
success: function(data) {
The getJSON function does not remove the scripts added to head when
using a callback (for jsonp). This of course means that you get a
build up of markup if you're using the getJSON function (with
callback) to poll a resource.
Someone called Tom had noticed this before, but the discussion was not
Hi,
I have no problem using jSON so far except that I am looking for a way
to "browse" the items sent from the server to the client in such
fashion:
foreach key (keys myJSONobject) {
var value = (myJSONobject[keys]) ;
}
Any hint?
Thanks!
i have a problem with $.getJSON(), nothing is logged in firebug
console although i can see that correct data is returned in response
(in firebug) for code:
>>>
$.getJSON(url, function(data){
console.log(data);
});
<<<
same code, but using $.get instead $.getJSON works as expected:
>>>
$.get(u
Here's my file:
$(document).ready(function() {
$.getJSON("home.json", function(data){
alert(data);
});
});
Err
The "home.json" file loads just fine, but the callback is never
invoked, i.e. alert(data) never runs. It had been
Ive noticed that $.getJSON never attempts to remove the script tags it
inserts. Is this a bug or by design?
-Tom
Hi guys,
Is there any way to handle timeouts when using $.getJSON() ?
I tried to setup ajax "timeout" options to 2500 (2.5 sec), but as
getJSON does not use a XHR,
it seems not to work.
Any help would be grately appreciated,
thanks in advance,
Matt
Can anyone tell me what is wrong with the following. I am new to
JQuery and I do not know if I am doing anything wrong here. I am not
just looking for an answer, I am trying to understand what is going on
here and I do not understand by looking at the existing jquery.js I
have or searching the web
I'm trying to use getJSON to return some JSON from a PHP page. I can
see that the request is returning the expected response with Firebug,
but the getJSON callback isn't firing?
My PHP is simply
Do a need to set a special content type before returning the JSON?
Hi all,
I use $.getJSON with flickr REST API, unfortunately flickr is answering:
jsonFlickrApi({"photos":{"page":1, "pages":10, "perpage":100,
"total":"938", "photo":[{"id":"
I guess i should remove "jsonFlickrApi(" header to get the json
interpreted. So i tried:
$.get(url, function(respon
This is actually probably more relevant to post() since I can
concatenate the parameters with the link for getJSON(), but here we go
anyway.
I am pulling JSON information from the server for menu links, and then
creating the menu off of that. Let's say that I have
{page: 'update.php', linkname:
66 matches
Mail list logo