On Dec 20, 9:41 am, Monica <[EMAIL PROTECTED]> wrote:
> yes, this is working for me:
>
> var tb = $("#searchDataTable");
> tb[0].rows[rowid].cells[colid].innerText.

Yikes!

> Let me know if this can be improved furthur...

The innerText property is a proprietary IE feature that has been
copied by some browsers but not others.  The W3C equivalent is
textContent, which is implemented by Firefox.

The jQuery text() method is intended to overcome these differences, as
is the getText function in my post (it is a trimmed down version, the
full version has a recursive function to get the text content if
neither textContent or innerText are supported).

My intention was to point out that there are other interfaces
available which may be better, depending on your circumstance.  If you
are getting the content of a single cell and speed is of no concern,
then likely the selector method is best.  But if you are doing a lot
of that and speed is critical, the example I posted shows how to do it
very much faster.

Which method you use depends on which of the above scenarios best fits
your circumstance.


--
Rob

Reply via email to