Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] My first JSON object
- Date: Mon, 12 Jul 2010 22:12:09 +0900
- From: Dave M G <dave@example.com>
- Subject: Re: [tlug] My first JSON object
- References: <4C1C3348.90506@example.com> <20100619044940.GA18726@example.com> <4C23481B.1090904@example.com> <20100625080744.62b6b298.gstewart@example.com> <32853.61.193.161.149.1277458953.squirrel@example.com> <4C25510C.3090002@example.com> <20100626083312.3f29d97d.gstewart@example.com> <4C26F2F4.80600@example.com> <20100627173336.e2533f06.gstewart@example.com> <4C300FEB.30405@example.com> <4C308DC9.4040309@example.com> <20100704151513.4c0ce0b6.gstewart@example.com>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100527 Thunderbird/3.0.5
TLUG, Thanks so far for all the help.Something isn't working, and I'm stuck. For a test, I'm just trying to send a JSON object to a PHP script that is going to just turn right around and send the data back.Here's my Javascript: var myJSON = { "name": "my_simple_object" }; $.post('jsonhandler.php', myJSON, showResult, "text"); function showResult(json_data_received) {console.log("The value of the JSON object is: " + JSON.parse(json_data_received));} And here's my PHP: $data = json_decode(stripslashes($_POST['karamohJSON'])); Header("Content-Type: application/json"); echo json_encode($data);Unfortunately, in the Firebug console I'm testing with, the value of the JSON object is always "null".Where did I go wrong? Thanks for any advice. -- Dave M G
- Follow-Ups:
- Re: [tlug] My first JSON object
- From: Dave M G
- References:
- Re: [tlug] My first JSON object
- From: Dave M G
- Re: [tlug] My first JSON object
- From: Fredric Fredricson
- Re: [tlug] My first JSON object
- From: Godwin Stewart
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Willcom 3G modem on Linux
- Next by Date: Re: [tlug] [announcement] 2010-07-10 Technical meeting
- Previous by thread: Re: [tlug] My first JSON object
- Next by thread: Re: [tlug] My first JSON object
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links