Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

json · JSON JavaScript Object Notation

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 590
  • Category: Data Formats
  • Founded: Jul 19, 2005
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
json parsing problem...very peculiar!!!!   Topic List   < Prev Topic  |  Next Topic >
Summarize Messages Sort by Date  
#1274 From: "JIJO DASGUPTA (ANAND)" <jijodasgupta@...>
Date: Mon Jun 8, 2009 2:21 pm
Subject: json parsing problem...very peculiar!!!!
jijodasgupta
Send Email Send Email
 
<!-- this is the javascript json parser function -->

<script type="text/javascript" src="../jquery-1.2.6.min.js">
</script>

<script type="text/javascript">

$(document).ready(function()
{
$('form#search').bind("submit", function(e)
{
e.preventDefault();
$('#content').html('');

var query1 = urlencode($('input[name="user_a"]').val()); //userA
var query2 = urlencode($('input[name="user_b"]').val());
//userB



$.ajax('http://twitter.com/friendships/exists.json?user_a='+query1+'&user_b='+qu\
ery2,
function(data,textdata)
{


if(data == 'true')
{
var newDiv = '<p>true</p>';
}

$('#content').append(newDiv);

}, 'text');
});
})

function urlencode(str) {
return escape(str).replace(/\+/g,'%2B').replace(/%20/g,
'+').replace(/\*/g, '%2A').replace(/\//g, '%2F').replace(/@/g, '%40');
}
})

</script>

<!-- javascript ends here -->

this functions will GET the json response from twitter which is true or false
after checking will append new div to the body....

problem is tht it doesnt seem to be working n i cant find the error...plzz
help...





#1275 From: "Douglas Crockford" <douglas@...>
Date: Mon Jun 8, 2009 3:34 pm
Subject: Re: json parsing problem...very peculiar!!!!
douglascrock...
Send Email Send Email
 
--- In json@yahoogroups.com, "JIJO DASGUPTA (ANAND)"
> problem is tht it doesnt seem to be working n i cant find the error...plzz
help...

Your question is out of scope for this group. Ask the jQuery people.





 
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help