I have the following partial, listed at the bottom of this post. It
has a Javascript function with it, and a select, and an observe field
on the select.

Everything works fine when it is loaded with the entire page, but
rendering the partial alone, of course, the javascript will not
execute. How can I force the javascript function to execuste when I do
subsequent
render  :partial => 'thispartial'

Thanks RVince
-------------_thispartial.html.erb-------------

<script>
function doReset(){
        document.getElementById("channelnotes").options.selectedIndex = 0;
        document.getElementById("channelnotes").options
[document.getElementById
("channelnotes").options.selectedIndex].value="";
}
</script>

<%= select("channelnotes", "channelnotes", Channelnote.find
(:all,  :order => 'tstamp DESC', :limit =>3, :conditions =>
["deleted=0"]).collect {|p| [ p.note, p.note]}, { :include_blank =>
true , :selected=>0, :value=>""},{}) %>
<%=  observe_field "channelnotes", :url => {:controller
=> :channels, :action => 'notesboxchange' }, :frequency => 1.0, :with
=>  "'channelnotes=' + value" %>

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

Reply via email to