Forum
15:25
19/07/2010
Hi,
I created a JSFiddle which illustrates the problem:
It should override the input value in the edit form with 'bla' but does not do so, as the element passed to custom_value does not seem to exist.
As I already pointed out here: http://www.trirand.com/blog/?p.....038;hellip;..=393#29419
I think the bug is that custom_value is called before the form is attached to the table body.
A workaround seems to be to replace this code in createData:
opt.custom_value.call($t, $("#"+nm,"#"+frmgr),'set',tmp);
}
With this:
opt.custom_value.call($t, $("#"+nm,tb),'set',tmp);
}
Or am I not getting something? Then please provide me with a fixed JSFiddle
Greetings,
Torge.
Update:
For everyone with the same problem. I found a workaround without patching the jquery code.
custom_value : function(elem, operation, value) {
if ($(elem).length == 0) return;
... Do your stuff ...
}
This works becuase in these cases custom_element already has been called and was able to set the value correctly. In other cases the Form is already attached to the table and the elem object is pointing to it correctly.
Most Users Ever Online: 715
Currently Online:
36 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66