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: 11Questions: 2Answers: 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: 20,139Questions: 26Answers: 4,734

    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: 11Questions: 2Answers: 0

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

  • kthorngrenkthorngren Posts: 20,139Questions: 26Answers: 4,734

    Do you have a new link with the updates?

    Did you try the delegated events as I suggested?

    Kevin

  • iansriansr Posts: 11Questions: 2Answers: 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: 20,139Questions: 26Answers: 4,734

    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

  • iansriansr Posts: 11Questions: 2Answers: 0

    Fixing the ! didn't change anything.

  • iansriansr Posts: 11Questions: 2Answers: 0

    Moving the jquery code into the data tables code is working. Thanks for the help.

Sign In or Register to comment.