javascript - How to post function in Codeigniter using jQuery? -


I have some problem in the jQuery post. I use Codeigniter, and when I try to post the function with jQuery I do it, so it does not work.

Here is my view file:

  & lt; Div id = "dtk" & gt; & Lt; / DTK & gt; & Lt ;! - I want to get value from this element - & gt; & Lt ;? Php foreach ($ result- & gt; result as $ line) {? & Gt; & Lt; Input type = "hidden" name = "id_sesi" id = "idse" value = "& lt ;? php echo $ row-> id_sesi ;;>" & Gt; & Lt ;! - Get value from this element ID - & gt; & Lt ;? Php}? & Gt;  

And here is my javascript:

  $ (document) .ready (function () {$ (function () {setInterval (function () { var) Wkt = $ ( "dtk"). Html (); var ses = $ ( "idse"). Html (); $ .post ( 'admin / update', {dtk: wkt, id_sesi: ses}); }, 1000);}});  

And here's my controller:

  function updates () {$ this-> Load-> Model ('$' data ['id_sesi'] = $ this-> Input-> Post ('id_sesi'); $ data ['dtk'] = $ this-> Input-> Post ('Dtk'); $ this-> model-> update ($ data);}  

and I url post to & lt ;? php echo base_url ();? & Gt; Controller / Update is still not working. Can anyone help me?


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -