Featured post
ruby on rails - RoR : JQuery and Ajax request -
i fan of ruby on rails , looking tutorials adding ajax page. tried this tutorial, source there. kinda understand code, on computer, after sliding stock-list not update , keeps on displaying entire stock list, values passed around correctly, can check in controller.
i tried modifying code , adding jrails in app/views/index.js.erb instead of
respond_to |format| format.html format.js render :update |page| page.replace_html 'x_stock_list', :partial => 'stocks/stock_list', :locals => { :stocks => @stocks } end
or adding simple alert js function file, shows plain text, when force use file (by deleting 'format.html' line above). apparently, javascript did not executed.
according lot of tutorials ryan bates (railscasts) , line had added application.js:
jquery.ajaxsetup({ 'beforesend': function(xhr)
{xhr.setrequestheader("accept", "text/javascript")}})
to force javascript executed, did not either.
has idea or on pc slider not update?
move format.html down last format in list. had problem while , apparently order matters.
- Get link
- X
- Other Apps
Comments
Post a Comment