Click here to Skip to main content
15,881,709 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: Progress Bar Pin
Manish K. Agarwal2-Sep-12 19:51
Manish K. Agarwal2-Sep-12 19:51 
GeneralRe: Progress Bar Pin
twseitex4-Sep-12 3:18
twseitex4-Sep-12 3:18 
Questionget the checkbox index or table row index with javascript Pin
osman makhtoom30-Aug-12 13:01
professionalosman makhtoom30-Aug-12 13:01 
AnswerRe: get the checkbox index or table row index with javascript Pin
enhzflep30-Aug-12 13:26
enhzflep30-Aug-12 13:26 
GeneralRe: get the checkbox index or table row index with javascript Pin
osman makhtoom30-Aug-12 13:45
professionalosman makhtoom30-Aug-12 13:45 
GeneralRe: get the checkbox index or table row index with javascript Pin
enhzflep30-Aug-12 14:36
enhzflep30-Aug-12 14:36 
GeneralRe: get the checkbox index or table row index with javascript Pin
osman makhtoom30-Aug-12 19:51
professionalosman makhtoom30-Aug-12 19:51 
GeneralRe: get the checkbox index or table row index with javascript Pin
BobJanova30-Aug-12 22:48
BobJanova30-Aug-12 22:48 
If you need the row index, it's a good idea to stash it in the element, e.g.

<table>
<tr><th>... (header row)</tr>
<tr rowid=0><td>... </tr>
<tr rowid=1><td>... </tr>
</table>


(I'm not sure if you can use tBodies[0].rows.indexOf or something like that. I'm not an expert in this regard. But what you usually want is actually a row id which can be tied into the query you are running, and that won't be the same as the index anyway.)

If you know the checkbox is in the same row, though, you don't need the index to adjust it.

function rowOnClickHandler(evt){
 var row = evt.target ? evt.target : evt.srcElement; // IE compatibility
 var checkbox = row.cells[0].getElementsByTagName('INPUT')[0];
 checkbox.selected = !checkbox.selected;
}

GeneralRe: get the checkbox index or table row index with javascript Pin
enhzflep30-Aug-12 23:18
enhzflep30-Aug-12 23:18 
AnswerRe: get the checkbox index or table row index with javascript Pin
enhzflep30-Aug-12 23:24
enhzflep30-Aug-12 23:24 
GeneralRe: get the checkbox index or table row index with javascript Pin
kmoorevs28-Sep-12 6:07
kmoorevs28-Sep-12 6:07 
Questionuse JQuery in C# code Pin
GSingh-Developer29-Aug-12 7:26
GSingh-Developer29-Aug-12 7:26 
AnswerRe: use JQuery in C# code Pin
jkirkerx29-Aug-12 8:01
professionaljkirkerx29-Aug-12 8:01 
GeneralRe: use JQuery in C# code Pin
GSingh-Developer29-Aug-12 8:26
GSingh-Developer29-Aug-12 8:26 
GeneralRe: use JQuery in C# code Pin
jkirkerx29-Aug-12 9:49
professionaljkirkerx29-Aug-12 9:49 
AnswerRe: use JQuery in C# code Pin
BobJanova30-Aug-12 0:18
BobJanova30-Aug-12 0:18 
GeneralRe: use JQuery in C# code Pin
jkirkerx30-Aug-12 7:34
professionaljkirkerx30-Aug-12 7:34 
SuggestionText editor Pin
Nolee K28-Aug-12 2:57
Nolee K28-Aug-12 2:57 
GeneralRe: Text editor Pin
Pete O'Hanlon28-Aug-12 3:06
mvePete O'Hanlon28-Aug-12 3:06 
GeneralRe: Text editor Pin
BobJanova28-Aug-12 3:31
BobJanova28-Aug-12 3:31 
AnswerRe: Text editor Pin
Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)28-Aug-12 3:56
protectorTadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)28-Aug-12 3:56 
GeneralRe: Text editor Pin
R. Giskard Reventlov28-Aug-12 9:41
R. Giskard Reventlov28-Aug-12 9:41 
AnswerRe: Text editor Pin
Joan M28-Aug-12 10:00
professionalJoan M28-Aug-12 10:00 
Questionautomatically checking a check box in a website. Pin
saadmechiche26-Aug-12 22:20
saadmechiche26-Aug-12 22:20 
AnswerRe: automatically checking a check box in a website. Pin
Shameel28-Aug-12 3:35
professionalShameel28-Aug-12 3:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.