387 Topics
| |
So, basically I'm trying to fetch part of a json feed and output just that. Example, theres a bunch of posts, comments, and an image on the post. I want to only fetch the image. I've started out with [CODE] document.getElementById('url').innerHTML= url.value; r=function(data) {url=data['results'];};[/CODE] html [CODE]<script type="text/javascript" src="http://www.com/search.json?q=word&callback=r"></script> <style type="text/css" … | |
Hi, I have inherited a project from a colleague and have an intersting problem. The project attempts to deserialize a type 'Client' into a new 'Client'. [CODE] Client mainClient = null; using ( stream = File.Open(resourceFilePath, FileMode.Open)) { BinaryFormatter bin = new BinaryFormatter(); mainClient = (Client)bin.Deserialize(stream); } [/CODE] this throws … | |
I have made a couple of preliminary versions of a web machine as an HTA and as a web dialog plug in for Google's Sketchup. The machine has moving sliders (hence machine) that get populated with names of real objects in a hierarchical structure set by the user's associations e.g. … | |
I have been trying to mimic GoogleReader's Json output, particularly the subscription listing. I started out creating classes for deserialization but I don't have a full grasp of the concepts. It crashes when I really try to consume the Json file, but when I generate my own serialized file it … | |
This is my sample application which provides result as follows: [CODE]Array Values : arr[0][0] :6 arr[0][1] :0 arr[0][2] :0 arr[1][0] :0 arr[1][1] :0 arr[1][2] :0[/CODE] am using the jQuery Highcharts: [CODE]chart = new Highcharts.Chart({ chart: { renderTo: 'container', defaultSeriesType: 'column' }, title: { text: document.chart.chartTitle.value }, series: [{ name: 'USA', … | |
I am new to JSON... I have been told to use it with XStream in my project.. I searched on net... But, I did not get any satisfactory information.... So, can anyone please tell in simple language what is JSON n basically why is it used? | |
Here is the json show: [CODE]{ "results": [ { "title": "Conflicting Reports on Iran\u2019s Arrest of a Foreign Woman", "multimedia":[ { "caption": "Moktada al-Sadr spoke to thousands of supporters on Saturday, stating conditional support for the Iraqi government." } ] } ...] }[/CODE] I tried this code, but I can … | |
Hi pals , I am really stuck in parsing a JSON string and take it's values. I got the json string as {"user":{"id":"1","firstname":"Freelogin","created":"0000-00-00 00:00:00","lastname":"Administrator","email":"fred@websecurify.com", "usergroup_id":"1","status":"1","ip_enable":"N","priv":"0","expire":""},"data":{ "1":{"5":{"last_update":"2010-12-13 16:16:16","status":"0"},"3":{"last_update":"2010-12-13 16:41:48","status":"1"}},"2":{"6":{"last_update":"2010-12-13 16:41:48","status":"1"}}},"server_array":[{"id":"1","name":"anes.yyy.net"},{ "id":"2","name":"neseema.xxx.net"}],"service_array":[{"id":"5","name":"POP3"}, {"id":"6","name":"Cpanel"},{"id":"3","name":"SMTP"}],"sort_by":"servername", "sort_order":"ASC","pagelinks":"","totrows":"2","offset":"0","limitvalue":"10", "rows_monitor":2,"current":"monitor","uri":false} Friends How to Parse this and take the Results for further processing in javascript.... I am waiting … | |
Hi, Below is the data format which I am passing to php via javascript in json format. [CODE] {"name":"Secret","value": "checked","name":"OldSpice","value": "unchecked","name":"Degree","value": "unchecked","name":"Dove","value": "unchecked","name":"Axe","value": "unchecked","name":"Maxim","value": "unchecked","name":"Nivea","value": "unchecked",}[/CODE] I can access the data successfully using the code [CODE]echo $_POST['name'];[/CODE] I want to convert it to an array. I tried to use json_decode() … | |
I am able to present the organizations for a user selected city and state and I am then able to "down select" using the id which presents me with the json encoded data for a single organization. The problem is that along with the json encoded data I am getting … | |
I am writing Spring web MVC app whereby the client and the server communicates by sending json messages. On the client I am making asynchronous calls to update textboxes. Could you please let me know if I am using the right syntax? I have hit a brick wall and cannot … | |
hi i'm using this, its working great, but if someone has a hyperlink in their status it doesnt pull it across - is there anything someone can think of? Thanks [CODE] $(document).ready(function(){ var username='xxxxxxxx'; // set user name var format='json'; // set format, you really don't have an option on … | |
I'm having a problem with the following code: I have the following jquery call: the problem is that I have several `<select name="^DDLColumns1..2..3..4`. etc.. controls on my page, however this is only populating the first one: `<select name="^DDLColumns1"` anybody know why the select would do this? <script type="text/javascript" language="javascript"> $().ready(function() … | |
If I run my php file manually I am getting the output as follows: [{"org_id":"39575","orgname":"ARTHRITIS FOUNDATION - VIRGINIA CHAPTER","orgcity":"RICHMOND","orgstate":"VA"}] The php code is as folows: [code=php] <html> <body style="background-color:#33990f"> <?php // connect include require ("connect.php"); $query = "SELECT * FROM orgs WHERE org_id = 39575"; $result = mysql_query($query)or die(mysql_error()); if … | |
[B]This is the code that not getting the result[/B] [CODE] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <title>Nice select</title> <script Language="JavaScript"> function checkData() { var myTest = me.D1.value; //alert(myTest); var req = new Request.JSON({ url: 'dbselect.php', method: 'post', data: 'brand=' + encodeURIComponent(myTest) }); req.addEvent('success', function(response) { var … | |
Hi there, I couldn't find a solution to this small problem so posting it here. I have some hardcoded values I want to send back to the browser. When I have this code: [code=php] ... $cr1 = '{"date_added":"8/3","type":"1","contact":"John Smith"}'; $cr2 = '{"date_added":"8/7","type":"2","contact":"Jane Smith"}'; $company_reqs[0] = json_decode($cr1,1); $company_reqs[1] = json_decode($cr2,1); $company_data['reqs'] … | |
Ok so I am trying to setup on my site to have 6 of my recent tweets. I am trying to use the .getJSON method and it is just not working. [CODE] $.getJSON("http://api.twitter.com/1/statuses/user_timeline/jrock2004.json", function(data) { $.each(data, function(){ $('<div></div>') .hide() .append('<span>' + this.text + '</span>') .appendTo('#tweets') .fadeIn(); }); }); [/CODE] Any … | |
I am having issues parsing JSON data from a web service. The web service is local on my machine, and I have added it as a Web Reference. Simple data types from the service work perfectly. However, if I call a method that returns a complex structure (such as an … | |
Hi all, I have a problem. I have a menu and when clicked it loads the data from that menu into my main page divs. However, I want to be able to auto refresh my div#mainview_json every 5 seconds. When I try to implement the auto_refresh = setInterval(blah, 5000); it … | |
Hi, In a previous JSON feed, I am passing through a market id on click to the below function. I then run another JSON feed within the below function, but I am trying to place the getmarketid var within one of the appending .html JSON div tags below to pull … | |
Can anyone tell me how use Ajax 2.0 with json in Asp.net 3.5 | |
The problem is, I'm beginner with php and have no idea what the difference between ajax and json. So if someone could clear that up first, that would be great. Now on to the bigger problem I found this validation script on this website: [url]http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/[/url] I have it working succesfully … | |
i wanna try to use ajax to async something from the mysql database.. i have read many tutorial/book/article recently and there are many things that I don't clearly understand. it looks like json is a good pick to do stuffs like loading things from a database. however, the examples i … | |
can any one tell what is json? why it's used , can you explain with a example. | |
I have this data in JSON: object(stdClass)#1 (2) { ["noun"]=> object(stdClass)#2 (2) { ["syn"]=> array(59) { [0]=> string(5) "drama" [1]=> string(13) "dramatic play" [2]=> string(8) "maneuver" [3]=> string(9) "manoeuvre" [4]=> string(3) "bid" [5]=> string(12) "child's play" [6]=> string(14) "playing period" [7]=> string(14) "period of play" [8]=> string(9) "free rein" [9]=> … | |
I recently herd the buzz about JSON and stuff was also saw the coding style , but still i am not able to appreciate it . Well i am working in python web framework (not Django) and also using templating language. when i wrote a program to just to add … | |
I need to iterate through a JSON object in JavaScript or jQuery that is returned from a PHP file with the a json_encode function call: echo json_encode ($varDump); The beginning of the JSON objects looks like the following: ["date","Rescription",{"date":"1715-05-03","description":"Edmund Halley observes total eclipse phenomenon \"Baily's Beads\""},{"date":"1765-05-03","description":"1st US Medical school opened"},{"date":"1797-05-03","description":"Jamaica … | |
Hi Been trying to use the json_parse function from the json.org website - looking for a link to a tutorial (or a short example) to show how i would use it to cycle through a list of responses - in this case im returning a JSON object with an id … | |
I am working on a Project in j2me, in this i have to bring some data through Wap in Json format and display it on mobile using MIDP, when some button is clicked. Like when i click a button 'Ships Information', it should bring the data which is being displayed … | |
Hi everyone, I want to convert [B]JDBC ResultSet to JSON Array[/B]. As u guess, direct casting isn't allowed.. How can I convert my DB data which is stored in ResultSet to a JSON Array? I'll be happy if someone can help me. Thanx in advance, With regards, Talha.. |
The End.