Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
110
rated 0 times [  117] [ 7]  / answers: 1 / hits: 24966  / 15 Years ago, thu, january 28, 2010, 12:00:00

I have a gridview in its 3rd cell, there is textbox control, I am calling javascript function on onchange.



Can some body tell me why this is not working in Firefox and Chrome but working in IE



grd.rows[rowindex].cells[3].childNodes[0].value


It return correct value in IE but not in Chrome and firefox (In FF and Chrome it return undefined)?



Please also suggest me solution to handle this problem.



Edit



alert(grd.rows[ri].cells[3].childNodes[0].value);//IE value=correct value, FF and chrome value=undfined
alert(grd.rows[ri].cells[3].childNodes[1].value);//IE value=undfined, FF and Chrome value= correct value


Thanks


More From » firefox

 Answers
30

I believe that this is because IE ignores text nodes that only contain newlines and tabs. Personally I prefer they be ignored but I would rather have consistency across the browsers.



<p><!-- This comment represents a text node.
--><em>text</em>
</p>

[#97731] Sunday, January 24, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
frederickmohamedw

Total Points: 21
Total Questions: 123
Total Answers: 105

Location: The Bahamas
Member since Tue, Apr 27, 2021
3 Years ago
frederickmohamedw questions
Wed, Sep 23, 20, 00:00, 4 Years ago
Sat, Jul 18, 20, 00:00, 4 Years ago
Sun, Apr 26, 20, 00:00, 4 Years ago
Sat, Jan 11, 20, 00:00, 4 Years ago
Fri, Dec 27, 19, 00:00, 4 Years ago
;