Jquery Confirm - 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: Jquery Confirm (/showthread.php?tid=38143) |
Jquery Confirm - El Forum - 01-31-2011 [eluser]Wonder Woman[/eluser] I have got a delete confirm set up on my site but I can't get my controller to determine what button was clicked because I have had to change my submit to buttons for the jquery to work so the controller can't pick up which button was clicked but it could when it was a submit If you could help me I would be most grateful, thanks. View: Code: form_submit('submit', 'Delete', 'class="confirm_delete"') Javascript (there is more to this but this is the main part): Code: $('.yes').bind('click', function(){ Controller: Code: if($this->input->post('submit') == 'Delete') { Jquery Confirm - El Forum - 02-01-2011 [eluser]Wonder Woman[/eluser] Hi everyone, does no-one have any idea on how I can fix this please? I'm totally stuck I will reward you with a very kind thank you Jquery Confirm - El Forum - 02-05-2011 [eluser]andyy[/eluser] Can you post a link to the actual site? Or include the all html for the form, and all the code of the javascript calls. If you can do this, I should be able to help Jquery Confirm - El Forum - 02-07-2011 [eluser]vitoco[/eluser] I've found a not very elegant solution : 1.- make a hidden input name "action_input" 2.- add event handlers to the buttons Code: $('#button_delete,#button_other_case').click( function(e) this works cause the "click" event occurs before de submition of the form Saludos |