vendredi 27 février 2015

using jQuery to manipulate cell data, change/edit event.target


Vote count:

0




I have a table with rows and columns, creating lots of cells, each cell has a X and Y id so i can access any cell for the text and either read or change it as and when i please.


In each of these cells when i want to edit the text, i would double click on the cell, and i change the text for an input field. When i have finished editing i can click anywhere in the table and it will close the input field and convert the cell back to plain text. If i double click on another cell, it first turns that cell back to plain text and then turns another cell to an input field. This works great.


However i want to use the TAB key, so when i am in a cell, it knows the one next to it and performs the same functions the double click does. BUT im not sure how to change or build/change the "event.target".



var ajax_doubleclickaction = function(event){


obviously as i understand it, the event / event.target holds information/data so you know which cell has been clicked and i cant access that data to then change attribute/elements contained in that area.


but if i am calling that same function i need to know how to manipulate/build/change whats in the event to thing another cell has been clicked.


At the moment i have wrote a different function for the TAB and its just a little messing instead of using a function already built.


Hope this all makes sense.



asked 21 secs ago







using jQuery to manipulate cell data, change/edit event.target

Aucun commentaire:

Enregistrer un commentaire