Welcome Guest, Not a member yet? Register   Sign In
Confirm delete help
#1

[eluser]Wonder Woman[/eluser]
I have 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. But its not working, if you could help me get this working 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(){
   $('form#entries').submit();
});

Controller:
Code:
if($this->input->post('submit') == 'Delete') {
   // do the delete
}
#2

[eluser]cideveloper[/eluser]
from the minimal amount of code shown here it looks fine. Are you sure the form is being submitted? firebug will show form posts. You can also debug by looping through all POST variables in your controller, that way you can see what is being posted to the page.




Theme © iAndrew 2016 - Forum software by © MyBB