spstieng wrote:
> Ah, got it.
>
> The Post is correct and the Respons is correct... I think. It's in
> JSON, but not sure if it's correct.
>
> According to http://docs.jquery.com/Ajax/jQuery.post, last example,
> they have the following line in the php file:
> "John","time"=>"2pm")); ?>
> This i
Ok, I found the answer.
It was as simple as doing this: alert(data[0].name);
Notice the [0].
So here is the functional code for anyone who is wondering about this:
javascript file
---
jQuery(document).ready(function() {
jQuery('#storeListTable tr').click(function() {
Please paste here what the servers' response is.
On 16 Apr., 16:35, spstieng wrote:
> Ah, got it.
>
> The Post is correct and the Respons is correct... I think. It's in
> JSON, but not sure if it's correct.
>
> According tohttp://docs.jquery.com/Ajax/jQuery.post, last example,
> they have the
Ah, got it.
The Post is correct and the Respons is correct... I think. It's in
JSON, but not sure if it's correct.
According to http://docs.jquery.com/Ajax/jQuery.post, last example,
they have the following line in the php file:
"John","time"=>"2pm")); ?>
This is why they can output the info by
Josch wrote:
>
> By hitting F12, firebug opens up in Firefox.
> On the first use, you have to check all three options (Console,
> Javascript, Network).
> After reloading the page, you can see the requests and its answers
> under "Console".
> Under "Script", you can debug your scripts. Above "Scri
By hitting F12, firebug opens up in Firefox.
On the first use, you have to check all three options (Console,
Javascript, Network).
After reloading the page, you can see the requests and its answers
under "Console".
Under "Script", you can debug your scripts. Above "Script" you can
select which sc
I haven't figured out how to use this yet.
How can I debug a javascript file? I only see the html code from my
index.php.
(I have lots of experience using debugger tool in Visual Studio)
Steven
On 16 Apr, 15:19, Donny Kurnia wrote:
> Try running it in firefox with firebug extention. Open the
spstieng wrote:
> Hi, I'm trying to use jQuery.post() function to retrieve som data. But
> i get no ouput.
>
> My PHP file looks like this:
>
>inlcude_once('dal.php');
>
> //Get store data, and ouput it as JSON.
> function getStoreInformation($storeID)
> {
> $sl = new storeLocator
Thanks for taking your time.
Yes the click-handler works.
I controll this by outputting the storeID.
jQuery('#storeListTable tr').click(function() {
var storeID = this.cells[0].innerHTML;
alert(storeID); // storeID for clicked row is aoutputed.
jQuery.post("../get_storeData.php"
1. Some questions :-)
The click-Handler works?
The post is triggered?
2. You can't call a function just with func: getStoreInformation.
You could use your "func: getStoreInformation" on Javascript,
but then you have to do something like
$func = $_POST['func'];
$storeID = $_POST['sID'];
call_use
No, I don't get alert. That means it's failing silently.
I've tested the functions.php (by running it) and it ouputs the data
in JSON format.
So retrieveing and echo'ing the data works fine.
It's the jQuery that I got wrong.
1. How do I call a specific funtion within functions.php? I got a "bad
Do you get an empty alert or nothing?
On 16 Apr., 12:13, spstieng wrote:
> Hi, I'm trying to use jQuery.post() function to retrieve som data. But
> i get no ouput.
>
> My PHP file looks like this:
>
> inlcude_once('dal.php');
>
> //Get store data, and ouput it as JSON.
> function getSto
12 matches
Mail list logo