Forum Discussion

gkadambi's avatar
gkadambi
Occasional Visitor
13 years ago

<SPAN> with empty content is not recognized and treated as a Text Node. It is ignored.


The details given below represents one row in a list, each <P class="cellText"...> represents one column in the list row. There are 12 columns in the list and the innerText shows correctly. However when I look at the Object browser hierarchy, I see only 11 columns (i.e. 11 Text Nodes under the row object instead of 12), The one that is skipped is the column that has empty value. Is this the expected behavior? This makes it difficult to select a cell value based on row and column number. The cells that have empty values are not recognized as Text Nodes. I would expect to see 12 Text Nodes for each row regardless of whether a cell is empty. Moreover when I try to get the properties of a cell which has empty value using Object Spy, I am not able to select the empty cells.


===========================================

The HTML for one of those rows is given below:


<SPAN style="MIN-WIDTH: 4.68em; WIDTH: 4.68em; MAX-WIDTH: 4.68em" class="dummy listCell " data-mapposition="0" data-position="0" data-fieldid="dummy">


<P class="cellText " data-mouseover=""><SPAN class=rec_type_undefined></SPAN></P></SPAN><SPAN style="MIN-WIDTH: 10em; BACKGROUND-COLOR: #fdffcc; WIDTH: 10em" class="firstName listCell springy" data-mapposition="1" data-position="1" data-fieldid="firstName" data-tempbackground="temp">


<P class="cellText default" data-mouseover="Customer227">Customer227</P></SPAN><SPAN style="MIN-WIDTH: 10em; WIDTH: 10em; MAX-WIDTH: 10em" class="middleName listCell " data-mapposition="2" data-position="2" data-fieldid="middleName">


<P class="cellText default" data-mouseover=""></P></SPAN><SPAN style="MIN-WIDTH: 10em; BACKGROUND-COLOR: #fdffcc; WIDTH: 10em" class="lastName listCell springy" sizcache09286422774581993="4226 65 921" sizset="false" data-mapposition="3" data-position="3" data-fieldid="lastName" data-tempbackground="temp">


<P class="cellText default" title="" data-mouseover="Customer225">Customer225</P></SPAN><SPAN style="MIN-WIDTH: 10em; WIDTH: 10em; MAX-WIDTH: 10em" class="suffix listCell " data-mapposition="4" data-position="4" data-fieldid="suffix">


<P class="cellText " data-mouseover="Sr.">Sr.</P></SPAN><SPAN style="MIN-WIDTH: 8em; WIDTH: 8em; MAX-WIDTH: 8em" class="birthDate listCell " data-mapposition="5" data-position="5" data-fieldid="birthDate">


<P class="cellText default" data-mouseover="09/09/1976">09/09/1976</P></SPAN><SPAN style="MIN-WIDTH: 20em; WIDTH: 20em" class="streetAddress listCell springy" data-mapposition="6" data-position="6" data-fieldid="streetAddress">


<P class="cellText default" data-mouseover="Curtisville, Suite 208">Curtisville, Suite 208</P></SPAN><SPAN style="MIN-WIDTH: 8em; WIDTH: 8em" class="city listCell springy" data-mapposition="7" data-position="7" data-fieldid="city">


<P class="cellText default" data-mouseover="Curtisville">Curtisville</P></SPAN><SPAN style="MIN-WIDTH: 10em; WIDTH: 10em; MAX-WIDTH: 10em" class="stateProvince listCell " data-mapposition="8" data-position="8" data-fieldid="stateProvince">


<P class="cellText default" data-mouseover="PA">PA</P></SPAN><SPAN style="MIN-WIDTH: 10em; WIDTH: 10em; MAX-WIDTH: 10em" class="postalCode listCell " data-mapposition="9" data-position="9" data-fieldid="postalCode">


<P class="cellText default" data-mouseover="15032">15032</P></SPAN><SPAN style="MIN-WIDTH: 10em; WIDTH: 10em; MAX-WIDTH: 10em" class="countryCode listCell " data-mapposition="10" data-position="11" data-fieldid="countryCode">


<P class="cellText default" data-mouseover="1">1</P></SPAN><SPAN style="MIN-WIDTH: 10em; WIDTH: 10em" class="primaryPhone listCell springy" data-mapposition="11" data-position="12" data-fieldid="primaryPhone">


<P class="cellText default" data-mouseover="(333)333-3333">(333)333-3333</P></SPAN>