Hello there,
Kind of new to jQuery (stumbled across it two days ago when i was looking for pieces of _javascript_ to sort tables), but i'm a fan already! (and i never was a great fan of anything related to _javascript_)
(but that's not the reason for this contribution to the mailing list)
I'm creating a (hopefully) generic table viewer/editor (a bit like phpmyadmin) for MSSQL databases (initially). The goal is to just show the table (which is paged and sortable), and have the ability to edit fields on the fly. (just by doubleclicking field values)
With the jEditable plugin, that was a piece of cake. I also wanted to add the possibility to add a new record. So i added a hidden row at the bottom of the page, and show it when the 'new' or 'duplicate' button is clicked. Showing the row isn't a problem, but i want the 'edit row' to show the same cancelling behaviour as the jEditable fields do.
When editing a field (inline, with jEditable), the editing is cancelled when the user clicks outside the editing area. I would like to see this behaviour when Duplicating/Adding a row too.
Now, it is not that hard to attach a click event to the edit row's TR, but what i need to do is catch all clicks outside of that row. Any ideas on this?
And finally, one more thing:
Can the CSS/XPath _expression_ be dynamic, ie:
function fillEditField(fieldname,value) {
var fieldIdAttr = 'edit_' + fieldname;
$("input#"+fieldIdAttr).val(value);
}
I'm quite confident it can be done, but i just cant seem to find the way how...
Cheers!
Miel
Amsterdam, Holland
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/