Click here to Skip to main content
11,413,676 members (51,547 online)

JavaScript

 
GeneralRe: Progress Bar Pin
Manish K. Agarwal, 2-Sep-12 20:51
memberManish K. Agarwal2-Sep-12 20:51 
GeneralRe: Progress Bar Pin
twseitex, 4-Sep-12 4:18
membertwseitex4-Sep-12 4:18 
Questionget the checkbox index or table row index with javascript Pin
osmanjan, 30-Aug-12 14:01
memberosmanjan30-Aug-12 14:01 
AnswerRe: get the checkbox index or table row index with javascript Pin
enhzflep, 30-Aug-12 14:26
memberenhzflep30-Aug-12 14:26 
GeneralRe: get the checkbox index or table row index with javascript Pin
osmanjan, 30-Aug-12 14:45
memberosmanjan30-Aug-12 14:45 
GeneralRe: get the checkbox index or table row index with javascript Pin
enhzflep, 30-Aug-12 15:36
memberenhzflep30-Aug-12 15:36 
GeneralRe: get the checkbox index or table row index with javascript Pin
osmanjan, 30-Aug-12 20:51
memberosmanjan30-Aug-12 20:51 
GeneralRe: get the checkbox index or table row index with javascript Pin
BobJanova, 30-Aug-12 23:48
memberBobJanova30-Aug-12 23: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
enhzflep, 31-Aug-12 0:18
memberenhzflep31-Aug-12 0:18 
AnswerRe: get the checkbox index or table row index with javascript Pin
enhzflep, 31-Aug-12 0:24
memberenhzflep31-Aug-12 0:24 
GeneralRe: get the checkbox index or table row index with javascript Pin
kmoorevs, 28-Sep-12 7:07
memberkmoorevs28-Sep-12 7:07 
Questionuse JQuery in C# code Pin
GSingh-Developer, 29-Aug-12 8:26
memberGSingh-Developer29-Aug-12 8:26 
AnswerRe: use JQuery in C# code Pin
jkirkerx, 29-Aug-12 9:01
memberjkirkerx29-Aug-12 9:01 
GeneralRe: use JQuery in C# code Pin
GSingh-Developer, 29-Aug-12 9:26
memberGSingh-Developer29-Aug-12 9:26 
GeneralRe: use JQuery in C# code Pin
jkirkerx, 29-Aug-12 10:49
memberjkirkerx29-Aug-12 10:49 
AnswerRe: use JQuery in C# code Pin
BobJanova, 30-Aug-12 1:18
memberBobJanova30-Aug-12 1:18 
GeneralRe: use JQuery in C# code Pin
jkirkerx, 30-Aug-12 8:34
memberjkirkerx30-Aug-12 8:34 
SuggestionText editor Pin
Nolee K, 28-Aug-12 3:57
memberNolee K28-Aug-12 3:57 
GeneralRe: Text editor Pin
Pete O'Hanlon, 28-Aug-12 4:06
protectorPete O'Hanlon28-Aug-12 4:06 
GeneralRe: Text editor Pin
BobJanova, 28-Aug-12 4:31
memberBobJanova28-Aug-12 4:31 
AnswerRe: Text editor Pin
Tadit Dash, 28-Aug-12 4:56
memberTadit Dash28-Aug-12 4:56 
GeneralRe: Text editor Pin
mark merrens, 28-Aug-12 10:41
membermark merrens28-Aug-12 10:41 
AnswerRe: Text editor Pin
Joan Murt, 28-Aug-12 11:00
memberJoan Murt28-Aug-12 11:00 
Questionautomatically checking a check box in a website. Pin
saadmechiche, 26-Aug-12 23:20
membersaadmechiche26-Aug-12 23:20 
AnswerRe: automatically checking a check box in a website. Pin
Shameel, 28-Aug-12 4:35
memberShameel28-Aug-12 4:35 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.150427.2 | Last Updated 25 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid