Hi,
How to call javascript function using success in observe field .

      <%= observe_field (ha.id,
          :frequency => 0.5,
          :update => "article_list_#{ha.id}",
          :url => {:action => :auto_complete_for_article_title, :id =>
ha.id},
          :with => "'article='+ escape(value)",
          :success => "close_title(#{ha.id})")%>

<div id="article_list_<%= ha.id %>"></div>

In javascript :
  function close_title(div_id){
    document.getElementById('article_list_'+div_id).style.display="block";
  }

I want to call close_title function for every success ie. status 200 OK
.
let me know if any there are any alternatives if wrong

thanks,
sri..
-- 
Posted via http://www.ruby-forum.com/.

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