extend Jeditable example

extend Jeditable example

muaymuay Posts: 4Questions: 0Answers: 0
edited February 2010 in General
I'd like to know if it is possible to return a class value with the submitdata.

The example shows:

[code]
"submitdata": function ( value, settings ) {
return { "row_id": this.parentNode.getAttribute('id') };
[/code]

Id like to have something like:

[code]
"submitdata": function ( value, settings ) {
return { "row_id": this.parentNode.getAttribute('id'),
"class_id": this.Node.getAttribute('class')} ;
[/code]

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Hi muay,

    I don't see why not. What happens when you tried it? I think you might want this.parentNode.className for the TR class name. Drop the parentNode for the TD.

    Allan
  • muaymuay Posts: 4Questions: 0Answers: 0
    Thanks Alan,

    I dropped 'Node' and am now using classname, which works nicely.

    [code]
    "submitdata": function ( value, settings) {
    return { fermentable_id": this.parentNode.getAttribute('id'),
    "class_id": this.className };
    [/code]

    Many Thanks,

    muay
  • NJDave71NJDave71 Posts: 40Questions: 3Answers: 0
    How can I capture this.parentNode.getAttribute('id') I would like to hand this off to a function?
This discussion has been closed.