On Sat, Jul 6, 2013 at 12:02 PM, Atul Pratap Singh < atulpratapsingh05@gmail.com> wrote:
On Sat, Jul 6, 2013 at 7:38 AM, Supun Nakandala <supun.nakandala@gmail.com
wrote:
Hi Devs, I am experiencing an unexpected behavior with respect to the following two cases.
- Deleting a row from browse page.
- Deleting a row after searching
In sql.js, AJAX.registerOnload binds 'click' event to 'a.delete_row.ajax'.
In case of Browse page, the 'a.delete_row.ajax' elements are available at the time of event binding but on Search page, elements are not even created, they are created after one performs the search, so onload binding is unsuccessful. I guess using 'live' or 'on' instead of 'bind' would be better.
I replaced the bind event with live and now everything works fine.
Thank you
In the first case the request goes through the sql.js ajax handler. But
in the second case the request doesn't go through it and the request is not an ajax request.
The request should still be an ajax request, just the onclick event is not bound.
But in both cases the tag is same ("<a class='delete_row ajax") and in both cases sql.js file is added to the responses which are displaying the results. I tried to find what is going wrong here for sometime now and I couldn't find it. I would appreciate if you can provide me some help to figure this problem.
Thank You
-- Atul Pratap Singh http://blog.atulsisodia.in/
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel