I currently have a form which submits using Ajax.Request, a php file
processes the form info then upon completion of the function, I use
Ajax.Updater to reload the div content which contains my updated list
of users.

My only issue is how do I get the form to reset after the Ajax.Request
and Ajax.Updater completes. I am still learning and trying to read
through all things Prototype to learn how to do this correctly.
However, I've been unable to figure it out. I've tried
Form.reset('formName') in it's own JS function and trying to run after
my Ajax.Updater completes, but it is not working.

Here is my script:

<script type="text/javascript">

//For the initial load of the page
new Ajax.Updater('current_users', 'users_current.php', { method:
'get' });

function ajaxRequest(url,data) {
  var aj = new Ajax.Request(
  url, {
   method:'post',
   parameters: data,
   onComplete: reloadUsers
   }
  );
}

function reloadUsers() {
        new Ajax.Updater('current_users', 'users_current.php', { method:
'get'});
}
</script>

I know I might be doing this wrong, but I am into day 3 of learning
this so I am open to any tips and reprimands!

Thanks in advance,

Jen


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to