![]() |
problem with ajax - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: problem with ajax (/showthread.php?tid=41104) |
problem with ajax - El Forum - 04-28-2011 [eluser]Bigil Michael[/eluser] i want to print price in accordance with value change in the select box. code i used is javascript Quote:function getprice(){ ajaxcommon2.php Quote:function select_price($id){my view page Quote:<select name="ad_type_id"> Quote:<select name="ad_price" id="ad_price" >now the code is working well and printing the result in a select box. my reqirement is remove the second select box; that means just print the result,not in a select box; i tried a lot..... but no result can any one help me??? thanks in advance... problem with ajax - El Forum - 04-28-2011 [eluser]Bigil Michael[/eluser] can anyone help me???? problem with ajax - El Forum - 04-28-2011 [eluser]pickupman[/eluser] Well it appears you are taking the response returned by your ajax call then using: Code: document.frm_add.ad_price.options = new Option(newVal, newVal); To add new option/value pairs to the select box. Just append the response to an html element instead if you are just wanting to display the text. Also, any reason for not using CI syntax in ajaxcommon2.php? Also, please try using the code button in the editor when posting code. It will make it a lot easier for everyone to read. |