Old table had in-line editor but doesn't work in datatables.

Old table had in-line editor but doesn't work in datatables.

iansriansr Posts: 7Questions: 1Answers: 0

Can I put the old in-line jquery code somewhere in the datatables call to keep it functional? I tried just adding it to the datatables call but that didn't work.

Test code:
http://live.datatables.net/locikuse/1/edit

Answers

  • kthorngrenkthorngren Posts: 16,363Questions: 25Answers: 3,886

    Seems like your test case is missing some code for your "old in-line jquery code". You need to include the font awesome library. Guessing you are expecting a form to open so the fields can be populated but I don't see the code for this.

    I would fist start by changing your click events to delegated events, like this example, so the click events work on each page.

    Kevin

  • iansriansr Posts: 7Questions: 1Answers: 0

    I added font awesome and the form code that I missed.

  • kthorngrenkthorngren Posts: 16,363Questions: 25Answers: 3,886

    Do you have a new link with the updates?

    Did you try the delegated events as I suggested?

    Kevin

  • iansriansr Posts: 7Questions: 1Answers: 0

    Sorry forgot to post the new link

    http://live.datatables.net/qajumuge/1/edit

    I will work on the delegated events but got pulled away on another issue this morning.

  • kthorngrenkthorngren Posts: 16,363Questions: 25Answers: 3,886

    You are getting this error:

    Uncaught SyntaxError: Unexpected token '!'

    You have ! in the wrong place here:

                if !$(type=='search') {
                    $('input').prop('disabled', true);
                }
    

    Change that and see if things work better.

    Kevin

Sign In or Register to comment.