I thought i fixed the delete function but I just discovered a bug.
When I select a product and switch pages through the pagination, It deletes the selected rows without me clicking the delete button..I think I'm doing something wrong in the screen action.
Hi,
You don't. :)
Not easily anyway.
This is because when you build the page, the message is defined in the button and send to the browser. At this point, nothing is selected.
When the user mark a checkbox, the message is not changed. Than, when you click the button/link, the popup does not have the actual counter.
The EASIER (not best, probably) way of doing what you wants to do is to define the message in the button including a variable that is the counter of the checked.
Initially, it will be zero.
Than, in the check box, set a OnChange action.
In the action:
1. check if the variable is True (increment the counter) or False (decrement the counter).
2. Ajax Refresh the button (the message will be updated).
It is also possible to do this with JavaScript, of course.
Cheers,
Eduardo Jauch