execute simple script.. not working, help pls?

execute simple script.. not working, help pls?

hernanhernan Posts: 3Questions: 0Answers: 0
edited November 2012 in General
Hello,
i have this:

{ "fnRender": function ( data, type, full ) {
return "$$id(function(x){alert(x);})(5);alert( '$$id'); $('lojas-$$id').html('---');".render({id: type});
}, "aTargets": [ 5]
},



it prints the $$id, but i want to execute the part inside ... and it doesnt seems to get executed... but its rendered there, i can see with firebug... whats the correct way to do this ?

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    No - fnRender writes in to the cell using innerHTML and script tags are not always executed. You'd be much better of using jQuery events: http://api.jquery.com/on/

    Allan
This discussion has been closed.