Depends.. if you want to use an event like onChange then do something like:
<input type="text" id="myinput" />
<script>
function onChangeHandler(event){
    var element = Event.element(event);
    yourFunction(element.value);
}
Event.observe('myinput','change',onChangeHandler);
</script>

If you want it sent when the user presses enter, I think you will need 
to use a form:
<form id="myform"><input type="text" /></form>
<script>
function onSubmitHandler(event){
    var form = Event.element(event);
    var element = Form.findFirstElement(form);
    yourFunction(element.value);
}
Event.observe('myform','submit',onSubmitHandler);
</script>

Is that what you wanted to know?
Colin

frank wrote:
> I'm wondering as to how one can take input from a user (say through a
> text box) and update a database with it without having to use a form.
> How does the text entered get sent to a processing script?
>
>
> >
>
>   


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

Reply via email to