Hmmm... yes Andy. I had a problem in my jQuery code. FireBug helped me
out.

Anyway, just in case, anybody stumbles onto this problem....here is
the code.

web/js/my_script.js
---------------------------------------
$(document).ready(function() {
  $('select#country').change(function() {
    $.ajax({
      url: "myAction?id=" + this.value,     // removed the "myModule"
here
      dataType: "text/html",
      success: (function(data) {
        $('select#states').html(data);
      })     });   });   });

Thanks and Regards
Vikram

On Feb 24, 7:06 pm, "Andy Dziahel'" <[email protected]> wrote:
> Hi.
>
> Use Firebug <http://getfirebug.com/> or another tool to monitor AJAX
> queries, or look into app logs to determine whether your request was
> actually processed.
>
> I think it is a sort of offtopic.
>
>
>
> On Tue, Feb 24, 2009 at 10:07, SeeVik <[email protected]> wrote:
>
> > Hello all,
>
> > I am creating an application in which I have two drop-down lists, when
> > one changes, the contents of the other are changed. Like selecting
> > country and states.
>
> > I am using Symfony with Doctrine and want to use jQuery for this
> > asynchronous task. here's where I am right now...
>
> > web/js/my_script.js
> > ---------------------------------------
> > $(document).ready(function() {
> >  $('select#country').change(function() {
> >    $.ajax({
> >      url: "myModule/myAction?id=" + this.value,
> >      dataType: "text/html",
> >      success: (function(data) {
> >        $('select#states').html(data);
> >      })     });   });   });
>
> > myModule/actions/actions.class.php
> > --------------------------------------------------
> > public function executeMyAction(sfWebRequest $request)
> > {
> >    // The static value here will be replaced with logic to
> >   // generate the real string
> >    $this->list = "<option>WA</option><option>CA</option>";
> > }
>
> > myModule/templates/myActionSuccess.php
> > -----------------------------------------------------------
> > <?php echo $list ?>
>
> > I am stuck up in this where nothing happens when I select a country.
> > How can I check whether the url is found by the jQuery or not ?
>
> > Thanks and Regards
> > Vikram
>
> --
> With the best regards, Andy.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to