ruby on rails - typewatch jquery callabck not updating html -


I am using the typeWatch plugin to monitor a text field and I want to send callback to an administrator, its After a divin view is killing the event controller but I can not find the device to update the content:

  $ (function () {$ ("#start_date"). TypeWatch ({highlight: true, callback: end}} function end (date) {$ .post ('/ matches / watch', {'date': date, complete: function (request) {$ ('# watch' ). Effect ('highlight', {color: "# C3FF29"}, 2000);},});}}); #match_ Controller def clock @preview_start_date = params [: date] response_to do | format | format.js end-end # watch.html.js $ ("# clock"). Html (& lt;% = @ preview_start_date% & gt;);  

Any help?

Try it out:

  $ ("#clock") .HTML ('& lt;% = @ preview_start_date% & gt;');  

And it also indicates that You are returning JavaScript from your controller:

  $ Effect ('highlight', {color: "# C3FF29"}, 2000); ',' ('/ matches / watch', 'date': date}, function (request) {$ ('# clock'). Script ');  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -