What can I use to simplify the process? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: What can I use to simplify the process? (/showthread.php?tid=61380) |
What can I use to simplify the process? - lexxtoronto - 04-11-2015 Code: <textarea name="lists" rows="1" cols="20" id="list_2" onclick="doUpdate(this.value, this.id,this.name)">Medium $1.40</textarea> And then doUpdate() brings up a prompt box, collects the new value from the prompt box (for example change Medium $1.40 to Medium $1.50), all other info and then makes an ajax call, which changes a relevant entry in the database. As of now the html code above is hand coded. Ideally I would like a php function to query the database and then generate the html code. For example if id is list_X then it would be an li element. Im planning to do it when running a foreach loop. Is there a simpler way of doing it? Ive never used json or xml - can I use them here and how? Thanks RE: What can I use to simplify the process? - gadelat - 04-12-2015 create a html helper. json nor xml have nothing to do with this RE: What can I use to simplify the process? - lexxtoronto - 04-12-2015 That's a good idea, thank you |