Ajax + javascript inside the table

Ajax + javascript inside the table

hydradictyhydradicty Posts: 5Questions: 0Answers: 0
edited March 2013 in General
Dear all,

Did anyone try to put objects with ajax and javascript inside the table for each entry. In one application, I have two icons for each entry: to add and to remove (from the cart), ajax fires the php link to add selected entry into the cart, or remove it from the cart, and the javascript switch the display of these two icons, without reloading the whole page, however, I was not able to get it work. If I switch to a regular table, it works.

Could there by some solutions for this issue?

Many thanks.

- Hydradicty

Replies

  • essexstephessexsteph Posts: 57Questions: 0Answers: 0
    I certainly use Ajax in a DataTable to save data and Javascript to change an icon, both work fine in a production environment. If you can post a test case on the DataTables live site ( http://live.datatables.net ) or JS Fiddle ( http://jsfiddle.net ) I can have a look.

    Steph
  • hydradictyhydradicty Posts: 5Questions: 0Answers: 0
    edited May 2013
    It happens on the second page (when the items are listed in multiple pages and you use the buttons on the bottom-right corner to go to a certain page).
  • essexstephessexsteph Posts: 57Questions: 0Answers: 0
    Almost certain that you've come up against the issue described in the FAQs: My events don't work on the second page. Have a look at http://datatables.net/faqs.

    Steph
This discussion has been closed.