Thanks Christopher, had a question on that code you sent me. When I
hit the submit button it sends me to the action page. Just wondering
why that happens? I know that code isn't finished yet, I'm just trying
to understand it so that I can figure out what I need to do next.
Here's the code again.

<script type="text/javascript" src="http://www.website.com/prototype/
prototype.js"></script>
<script type="text/javascript">
function bindFormToAJAX() {
  Event.observe('scripty', 'submit', function(e) {
    Event.stop(e);
    $('scripty').request({
      onComplete: function(transport) {
        $('script').value = transport.responseText;
      }
    });
  });
}
</script>
<body>
<form id="scripty" action="test2.php">
<textarea id="script" name="script">aaaa
</textarea><input type="submit" value="Send it!"/>
</form>
</body>
</html>




--~--~---------~--~----~------------~-------~--~----~
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