I have the following jquery code:
jQuery(function(){
jQuery("select#rooms").change(function(){
var options = '';
jQuery.getJSON("/admin/selection.php",{id: jQuery(this).val(),
ajax: 'true'},
function(j){
for (var i = 0; i < j.length; i++) {
//what should go here?
}
})
})
})
from the serve...
I've asked this before for Java, but this applies specifically to J2ME.
Is there a way in J2ME to convert a string, such as:
{"name":"MyNode", "width":200, "height":100}
to an internal Object representation of the same, in one line of code?
The problem with such JSON libraries, is that they generate JSONObjects from strings, not...
Is there any free xml/json whois service for unlimited queries?
...
Whats wrong in below JSON Object definition
I am trying to create a new JSON Object like below.
So that my idea is to access COMPANYSETUP.HourSetup.initiate();
Not sure the error ?
COMPANYSETUP = {
initiated : false,
companyId : "",
initiate : function() {
if(!initiated)...
I'm looking for a MooTools based data grid that supports JSON and XML data types. If anyone could direct me to one, and identify a few key points why they would select it, I would appreciate it.
...
I have an ASP.net web service that I'm using for a web application which returns a either XML or JSON data to me, depending on the function I call. This has been working well thus far, but I've run into a problem. I want to create an "export" link on my page that will download a JSON file. The link is formatted very simply:
<a href="myw...
Internally, Firefox will JSON encode an object passed via postMessage to and from the Web Worker. However, this only works in Trunk builds of Firefox (3.6+) and not in Firefox 3.5, so the question is really how to add backwards support of this operation to the current platform. The window.atob() and window.btoa() methods had been suggest...
I am having a hard time figuring out how to expose (& loop through) the properties
of my Categories class which was serialized (using JSON) in a WCF service and
deserialized on the server as illustrated below.
JavaScriptSerializer serializer = new JavaScriptSerializer();
Category cat = serializer.Deserialize<Category>(param1);
// M...
Hi,
Here's what I want, in wishful code:
in my controller action:
@javascript_function_args = [ "foo", "bar", 1, [2, 3], { :zort => 'narf', :nom => 'cake' }]
in my erb view:
<script … >
performAwesome(<%= @javascript_function_args.to_js_args %>);
</script>
or, even better:
<%= call_javascript_function :performAwesome, *@java...
I'm a novice-to-intermediate JavaScript/jQuery programmer, so concrete/executable examples would be very much appreciated.
My project requires using AJAX to poll a URL that returns JSON containing either content to be added to the DOM, or a message { "status" : "pending" } that indicates that the backend is still working on generating a...
Hello,
I would like to copy XML using XSLT into JSON.
The JSON result would look like this:
callback( {"xml":"
<?xml version="1.0" encoding="UTF-8"?>
<root>
...
</root>
"})
and my XSLT so far:
<xsl:template match="/">
<xsl:text>callback( {"xml":"</xsl:text>
<xsl:copy-of select="*"/>
<xsl:text>"} )</xsl:text>
<...
Hi, clientside I have some scripts that send to the server some strings... one of which comes from a Javascript Date object. Now, it has it own formatting and I was just wandering if is there a class that does the right conversion, as I am experiencing problems with SimpleDateFormatter...
...
I have a POCO class that is being sent to the browser as a JSON string in .NET 3.5 sp1. I am just using the default JSON serialization and I have some fields that I want to ignore. I want to put an attribute similar to [System.Xml.Serialization.XmlIgnore] on them so that they are not serialized.
...
My project requires polling a certain URL for a JSON response, using AJAX. The first AJAX request that I make alerts the server that I want some JSON content, and it begins building and cacheing a response, sending me back { "status" : "pending" } for each subsequent AJAX request until the JSON is ready. At that point, the response chang...
Hi All. I am relatively new to Jquery and JSON and this is my first post here, please bear with me.
I have a JSON menu string with an array of three items (name, url, id - our internal page id number) and the top level navigation builds out fine. I loop through the top level items and call a recursive function to get the sub menus.
...
I have a php page that is returning some data in json. Basically I am doing echo on this page.
The data being returned has some html tags. This is causing my jQuery code to break.
Is there a way to clean up the data and strip off the tags before putting it in the json object?
Furthermore, I am trying to display the data from json in...
Hello,
I'm currently using $.getJSON to pass an array of ids. It basically constructs a URL like this:
http://domain.com/json.php?id=1&id=2&id=4
My question is: How can I take these ids that are passed (1,2,4) and place them in my where clause?
Something like:
$id = $_GET['id'];
$sql = SELECT * FROM table WHERE usrID ...
I have a php page that is returning a json object like this:
header('Content-Type:application/json');
echo <<<HERE_DOC
[ {content: '{row2[contentFull]}', bigimages: '{$row3['catalogFileID']}'}]
HERE_DOC;
}
In my main page I have the following jQuery code:
jQuery(function(){
jQuery("select#rooms").change(function(){
var optio...
Hello,
I'm trying to use jQuery's $getJSON to send an array of 'ids'. Here's what my jQuery looks like:
var calendarIds = [];
$("#jammer :selected").each(function(i, selected){
calendarIds[i] = $(selected).val();
});
$.getJSON("test.php", {
start: start.getTime() / 1000,
end: end.getTime() / 1000,
calendarid:...
I'm likely missing something with json and javascript.
[{"commentText":"Testing 123","userPosted":"maxfridbe"},
{"commentText":"Testing 23","userPosted":"maxfridbe"}]
Sometimes I get multiple responses which works with this code:
function(data)
{
var sel = this;
jQuery.each(data,
fun...