ask about onchange and onclick php - 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: ask about onchange and onclick php (/showthread.php?tid=52927) |
ask about onchange and onclick php - El Forum - 07-02-2012 [eluser]C_Line[/eluser] i have a problem with onchange and onclick i wan enter a value in textbox and call the function like this : ======================================================== <input onchange="here()" type="text"name="qty"> <?php function here() { echo "hello"; } ?> ========================================================= but, when i entered the value, here() function didn't call please help me, and sorry my bad english thx ask about onchange and onclick php - El Forum - 07-02-2012 [eluser]Nisha S.[/eluser] PHP is a server side scripting language and cannot be called directly from client side. You can write a javascript with the function name and inside you can call php function by calling the relevant URL. [removed] function here() { alert("hello"); // call the url to executes the funcion. Given pattern below for codeigniter. Use ajax if you don't want to redirect to another page. [removed] = "http://www.yourwebsite.com/controller/function"; } [removed] ask about onchange and onclick php - El Forum - 07-03-2012 [eluser]C_Line[/eluser] this my url localhost/ex/index.php/main/come when i redirect using window . location window . location = "how" localhost/ex/index.php/main/come/how but, i wan localhost/ex/index.php/main/how thx for replies ask about onchange and onclick php - El Forum - 07-03-2012 [eluser]C_Line[/eluser] SOLVED thx for replies Nisha S |