On 4/27/07, Dan <[EMAIL PROTECTED]> wrote:
> Would someone give an example how I could replace a DOM object from the
> controller?
>
> For example, I have an onChange for a <select> that calls a function
> within the controller.  The controller function is receiving the
> this[this.selectedIndex].value (an integer).  I can pass the int value
> from the <select> onChange into the controller, storing it as c.value.
> I want the controller to take c.value and update the 'value' of a text
> field on the same page without a refresh.
>
> All I can figure out is how to replace an entire element, such as, a
> <div> or the entire <input> by return render_response('some_template')

This sounds more like a JavaScript library question.  It depends on a)
which JavaScript library you're using b) how you're doing your AJAX.
I'm going to take a guess that you're using Prototype with the Rails
Helpers.  If that's the case, I don't know, sorry ;)

Hmm, maybe this wasn't such a helpful response after all!

Good Luck!
-jj

-- 
http://jjinux.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to