couple of debugging steps I'd take:

1) remove the .getJSON() call and just alert('foo'), to ensure that the
change event is being triggered as you expect
2) install Firebug in Firefox and check whether or not there are errors in
the php document.

On Mon, Dec 21, 2009 at 8:16 AM, kikloo <tbha...@gmail.com> wrote:

> hi
>
> i have this simple code:
>
> $(function() {
>        $("select#ctlByName").change(function() {
>
>                cid = $(this).val();
>                $.getJSON("ajax.php",{cid:cid}, function(json) {
>                        alert("Data Loaded: " + json);
>                })
>        })
> })
>
> and its not working. Its set to work when a <select> is changed by
> user and it should then get data back from ajax.php which is sending
> the data fine. But no alert is coming up and it seems its not working.
>
> Please help.
>
> Thanks.
>



-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.

Reply via email to