Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to correctly associate double click with the Edit?
Message
Information générale
Forum:
Javascript
Catégorie:
JQuery
Divers
Thread ID:
01570547
Message ID:
01570670
Vues:
26
>>Here is what I see (see attached) - I am debugging in IE.
>>
>>What should I do with it?
>>
>>Here is what I currently have:
>>
>>
>>onSubmit: addFormData,
>>   //onDoubleClick: edit('Edit', this),
>>   onSuccess: bindDblClick,
>>   addTitleToCell: true,
>>   hideOnSubmit: false,
>>   height: 'auto',
>>   singleSelect: true
>>});
>>
>>and this is what I put in bindDblClick
>>
>>
>>function bindDblClick() {
>>   $('#flexClients tr').dblclick(function () {
>>      
>>      edit('Edit', $('#flexClients'));
>>   });
>>}
>>
>>where Edit starts with:
>>
>>
>>function edit(com, grid) {
>> 
>>   $('.trSelected', grid).each(function () {
>>
>>      var id = $(this).attr('id');
>>      alert('Id is: ' + id);
>>...
>>
>
>
>Responding here instead of the other thread:
>
>>I've upgraded to the latest jQuery and also downloaded the latest version of flexigrid (because the previous didn't work with latest jQuery) and now this solution doesn't work anymore :(
>
>>I am not sure how to fix it or make it work with the latest stuff. Do you have any ideas?
>
>Easiest thing - why did you upgrade? Do you need some new feature/bugfix of jQuery? If not, go back to the old version.
>
>To debug this, I'd open the site up in Chrome and select a row. Then I'd go into Elements and click on the magnifying glass icon (small icon at the bottom) and select the row that is highlighted. In the source I'd make sure that they're still attaching the class of "trSelected" to the selected rows. If that looked good, I'd then click on the Console menu option and attempt to view difference references / run your code:
>
>
>$('#flexClients')   (then hit Enter - is a bit of HTML returned? If not, you've got the wrong reference)
>
>$('.trSelected', $('#flexClients')).each(function() { alert('Id is: ' + $(this).attr('id')) })  (then hit enter, it should display the selected row ID)
>
It doesn't look like trSelected class is used, but I am not certain if I am correctly following your instructions. See attached picture - I do not see trSelected mentioned anywhere.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform