![]() |
mysql and json with onchange method - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: mysql and json with onchange method (/showthread.php?tid=37769) |
mysql and json with onchange method - El Forum - 01-19-2011 [eluser]Unknown[/eluser] I'm making a project using CodeIgniter which integrate with json. I want to display data from a database with onchange method. I get an example script from the internet and I implemented it in the project that I created. Here is the code: controller : Code: function select_load($no) { javascript (ist.js): Code: function getData(type) { view: Code: <scrip src="<?php echo base_url();?>public/js/ist.js" type="text/javascript"></scrip> my question is: -how to rewrite the script controller and javasscript(ist.js)to display alert box if field"last_meter"=null(no value) -when the value of field"last_meter" doesn't exist, input box"nm" show "undefined",how to change this message using alert box I hope somebody can help me to find the solution. Thanks before, for your kindness ^_^ Regards, Lix mysql and json with onchange method - El Forum - 01-20-2011 [eluser]zawaruddin[/eluser] r u Indonesian? replace to Code: function select_load($no) { u can replace index.php file... |