Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi everyone
I'm trying to send JSON data from PHP to JQuery and use JQuery to output the JSON data.
I used json_encode() to make the array into JSON format.
I can't seem to access the JSON data in JQuery though.
[syntax="javascript"]
$(document).ready(function(){
$("#myForm").submit( function() {
$.getJSON("something.php", function (json)
{
alert("JSON Data is received!");
});
});
});
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]