884 Topics

Member Avatar for
Member Avatar for garcon1986

Hello everyone, I have a problem when i use json and array. And i need your help. Here is my code: [CODE] while($row = mysql_fetch_assoc($result)){ echo json_encode($row); } [/CODE] The result is: [CODE]{"id":"1","title":"event1","start":"2009-11-10 14:18:15","end":"2009-11-03 14:38:22","allDay":"false","url":null}{"id":"2","title":"event2","start":"2009-11-09 15:41:20","end":"2009-11-10 16:41:25","allDay":"false","url":null}[/CODE] But i want the result is like this: [CODE] [{"id":"1","title":"event1","start":"2009-11-10 14:18:15","end":"2009-11-03 14:38:22","allDay":"false","url":null},{"id":"2","title":"event2","start":"2009-11-09 15:41:20","end":"2009-11-10 …

0
110
Member Avatar for benkyma

I have to connect remotely to my MSSQL database. However, I am a little unsure as to the best way to do this. Can I connect directly to the database from my client machine, or would it be best to create some kind of local script that does the connection …

Member Avatar for 12d3
0
101
Member Avatar for Altairzq

Hello... I can't see why this form is not working, when I generate if from a php script through Ajax. I made a test with the same code written directly in an html document and it works ok. Would appreciate any help. This is the code that generates the html …

Member Avatar for Altairzq
-1
126
Member Avatar for benkyma

I'm trying to connect to the twitter streaming api. At the moment I'm just trying to grab the incoming data stream, keep the connection open and write the data to the console. I can do this easily from a terminal using curl. The following code however runs, throws no errors, …

Member Avatar for VinayRok
0
930
Member Avatar for agrarian

I am trying to use a Dojo (ajax) table on my page that has detail rows in which I want to draw detail tables. The tables have a format event which calls formatDetail. In this event I would like to build a simple table using JSON data. My problem is …

Member Avatar for agrarian
0
2K
Member Avatar for sebber

Hi all, My PC, which was purchased brand new last year, has started to take a very long time to load up programs and tends to freeze when I click on a website link or program file. The PC has 3GB of Ram and has an Intel Core 2 Quad …

Member Avatar for crunchie
0
396
Member Avatar for Chad Gary

This is an AJAX/Prototype problem, which is independent of the server-side scripting language I'm currently using. I have the following multi-demensional nested array, which I have successfuly turned into a JOSN Object as such: [CODE][{"PlayerName":"Ron Artest","Positn":"Forward","Height":"6-7 l","Weight":"260","College":"St. Johns"}, {"PlayerName":"Kobe Bryant","Positn":"Guard","Height":"6-6 l","Weight":"205","College":"Lower Marion High Sc"}, {"PlayerName":"Andrew Bynum","Positn":"Center","Height":"7-0 l","Weight":"285","College":"St. Josephs"}, {"PlayerName":"Pau Gasol","Positn":"Forward","Height":"7-0 …

0
70
Member Avatar for Chad Gary

I'm having difficulty trying to return a multi-demensional array using Javascript Prototype's Hash Object. I have been able to return the values of the following associative php array using JSON and Javascript Prototype's Hash Object: php array [CODE]$player = array( 'PlayerName' => 'Ron Artest', 'Position' => 'Forward', 'Height' => '6-7', …

Member Avatar for Airshow
0
74
Member Avatar for arunajasmine

Hi, i am doing an application which make use of JQuery and Cakephp . In this i am using like the following to retrieve the values from my controller side [CODE] var getformid; $.getJSON("http://localhost/FormBuilder/index.php/forms/getFormEntry", function(json) { getformid=json.forms[0]["id"]; alert("Form id inside "+getformid); });//json alert("Form id ouside "+getformid);[/CODE] In the above code, …

Member Avatar for Airshow
0
1K
Member Avatar for Thirusha

Hi I have been struggling with this for some time now, and am not sure what is wrong. I am using the org.json package I have this json String which looks like this: [CODE]{"2009-08-04":[{"Status":"1","Description":"sdfsdf","Task Name":"task 2","TaskId":"2"},{"Status":"1","Description":"testing 3","Task Name":"testing 3","TaskId":"3"}],"2009-07-31":{"Status":"1","Description":"read POC","Task Name":"task 1","TaskId":"1"}}[/CODE] As u can see the one object is …

Member Avatar for Thirusha
0
135
Member Avatar for prax072

I am trying to dynamically populate a select box with Jquery and JSOn in my VB.Net ASP.Net application. The event is triggered in the selectedindexchanged of another ASP Dropdownlist in the page. I am getting my selectlist populated (thanks to [url]http://www.codedigest.com/Articles/jQuery/224_Building_Cascading_DropDownList_in_ASPNet_Using_jQuery_and_JSON.aspx)[/url]. i am passing two values to the select box. …

Member Avatar for prax072
0
175
Member Avatar for digital-ether

I've written an Object Cache in PHP. [url]http://code.google.com/p/php-object-cache/[/url] However, it requires PHP Sockets support which is not available on a lot of PHP builds. Coming to the conclusion that all hosting that support PHP should support C, I'm going to rewrite this in C. The PHP source is here: [url]http://code.google.com/p/php-object-cache/source/browse/trunk/socket.class.php[/url] …

Member Avatar for jephthah
0
171
Member Avatar for franko75

Hi, i'm setting up a couple of forms on the admin section of a CMS i'm developing. I want to use (unobtrusive) modal forms using JQuery, but I'm not sure how to return error messages/feedback from the server and display them [B]within[/B] the modal window. So this is where i've …

Member Avatar for Airshow
0
93
Member Avatar for drumichael87

Okay, here goes. I am using this template. [URL="http://collectibleshakers.com"]Site is Here[/URL]. Seems straight forward enough. Well, when I try to put my Twitter widget in the black bar, the navigation disappears. The twitter widget uses a UL, as does the navigation at the top of the page. There is evidently …

Member Avatar for dipak_passion
0
134
Member Avatar for adaykin

Hello I have a JSON array data.cells that I need to iterate through to get the values out of and put the values into an onclick event listener. Right now the variable name data.cells[i].letter is being based through the buildString function for each cell in my board, instead of the …

Member Avatar for essential
0
139
Member Avatar for abhinav.sharma

So, Python 2.6.2 is supposed to have the following JSON module: [url]http://docs.python.org/library/json.html[/url] I have the standard MacPython 2.6.2, but the attributes of my JSON library are different, can someone help me fix this? Here's mine: [url=http://img30.imageshack.us/my.php?image=picture1axb.png][img=http://img30.imageshack.us/img30/481/picture1axb.th.png][/url]

Member Avatar for abhinav.sharma
0
139
Member Avatar for hannahwill

hello Question: i get "Access denied" error.Can anyone convert the code below in JSON i need to access data from some other domain. OR any other fully explained efficient method to access cross domains plz. ---------js file-------------- [code=JavaScript]window.onload=makeRequest; function makeRequest() { var http_request={}; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request …

Member Avatar for ShawnCplus
0
82
Member Avatar for jayeskay2211

can anyone tell, how to fix this double clicking display problem on a browser(IE7 & FF3.0.x), whenever I click the find button for a text search, the alert box which was setup by me for debugging purpose is showing all that json(records) but the browser displays nothing. Now I try …

0
51
Member Avatar for crh0872

I'm new to C++, and I have a function, [inlinecode]char* parse( char* buf, char* find_this )[/inlinecode] which finds an instance of [inlinecode]find_this[/inlinecode] inside of [inlinecode]buf[/inlinecode]. Once it finds that, it looks ahead in the [inlinecode]buf[/inlinecode] text, (which is actually JSON formatted) finds the value in the text, and it returns …

Member Avatar for crh0872
0
151
Member Avatar for crh0872

Hello DaniWeb! I've created a function that parses a long string of text (JSON format, but that's not really important) for the specified JSON key/variable name, and it returns the JSON value as pointer to a char array. For example, [CODE=C++] //the function looks like: char* extract_key( char* buf, char* …

Member Avatar for crh0872
0
3K
Member Avatar for twistedind

Below is my javascript code. It seems to hanging up at the "var data = transport.responseText.evalJSON();" part. Here is a link to see how my html is made. [URL="http://twisted.visionsminis.com/price/compressors"]http://twisted.visionsminis.com/price/compressors[/URL] [CODE] if (!window.WAUpdater) var WAUpdater = new Object(); WAUpdater.Methods = { options: { redirectOnError: true, baseUrl: "", updateColor:'#666666', mode:"add", removeRow:null }, …

Member Avatar for kvdd
0
414
Member Avatar for dpd

Hi all, I'm not overly proficient at Javascript, but have fumbled my way through some tutorials to come up with the following code to create a tab mechanism. It works perfectly in Firefox, Safari, Chrome and IE8. However, in IE6 and IE7 it fails to operate as of the 'for …

Member Avatar for serkan sendur
0
112
Member Avatar for jculverwell

I am attempting to write a JSONP application and think that it is not working because the JSON my code is returning has surrounding quotation marks. For example when I call the webapp using [url]http://rest-client.googlecode.com/[/url] it returns the following "callbackfunctionname({'Last': 'Doe', 'First': 'John'})" Comparing this to a public url I …

Member Avatar for jculverwell
0
181
Member Avatar for anish.anick

Hi All, I am facing CPU utilization issue while iterating through HTML table rows. I am generating an HTML table dynamically using javascript which contains atleast 500 rows. After the creation of table, the table cells are assigned with some values from a JSON object. The sample code for assigning …

Member Avatar for ~s.o.s~
0
246
Member Avatar for Kelicula

Hi all, I am usually a Perl programmer, I have some background in javascript and am attempting to create a Googleish selector div. [I]Please bear with me, excuse the long introduction...[/I] Here's the details: Our site filters content by location. I use zip codes to find radius's. So if a …

Member Avatar for hielo
0
235
Member Avatar for Thirusha

My head is telling me that the answer to this question is going to be NO, but hopefully i m wrong. I have a servlet which gets redirected using RequestDispatcher to a jsp page, the jsp page has some html input fields. In the servlet i get the values from …

Member Avatar for Thirusha
0
115
Member Avatar for scott212

I'm building a site and attempting to do everything I used to do in PHP in Python (what can I say, I just like it better!). There are a couple of scenarios that I don't quite understand, however. Such as: 1. If my plain ol' Python page is called from …

Member Avatar for [Wacky]
0
116
Member Avatar for ishFady

Hi I am working with java project, using jsp, struts 2.1 and servlet technology. I would like to create a json file or a object from the data from the database using sql query on fly. Then pass this data to jsp page dynamically. Please can someone help or put …

Member Avatar for ~s.o.s~
0
67
Member Avatar for mgt

I'm new to Javascript and found some code on the internet that's supposed to create some nested select boxes. Here is the code: [code=html]<html> <head>Some testing</head> <script type="text/javascript" //src="http://trac.mochikit.com/browser/mochikit/trunk/packed/MochiKit/MochiKit.js?rev=1256&format=raw"></script> <script type="text/javascript"> /* <![CDATA[ */ // An array of the currently visible selects var level_selects = new Array(); connect(window, 'onload', function …

Member Avatar for digital-ether
0
1K
Member Avatar for Thirusha

Hi I have passed my json string to a jsp page, i would like to loop through this string to create a sql statement. Any ideas how i would go about looping through the json string in the jsp page? a snipet of thejson string looks like this: [CODE]{"CREATEDBYNAME":"TEST_ADMIN","NAME":"test001","TYPEID":"1900000000"}[/CODE] Any …

Member Avatar for Thirusha
0
95
Member Avatar for Thirusha

I am very new to json and havent used much ojects in javascript. I have created a json object, and after i move through a couple of forms in my app i want to access that same object, is there a way to do it? Any help will be greatly …

Member Avatar for Thirusha
0
103
Member Avatar for Thirusha

Hi i have been searching around the net, but have not have any luck(most probably i m searching for the wrong thing). I am able to get json data from my database, i now want to populate the text fields in my form how do i go about doing it?

Member Avatar for Thirusha
0
67
Member Avatar for Oxiegen

Hi. As suggested by ~s.o.s~ in another thread, I'm posting this question here in the high hopes that someone might be able to help me. I have a JSON string coming in from a javascript that I need to convert to a predefined class object. I'd even settle for a …

Member Avatar for Oxiegen
0
360
Member Avatar for smruti_patra

Hi, I want to create the Json(Java Script Notation Language) String in the struts2 action class and pass in to my jsp page. I am new to Json and struts2. Please guide me if any body has any idea on same. Thanks In advance.

0
46

The End.