Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieving data island field names
Message
De
10/08/2001 11:49:44
 
 
À
Tous
Information générale
Forum:
Internet
Catégorie:
Javascript
Titre:
Retrieving data island field names
Divers
Thread ID:
00542324
Message ID:
00542324
Vues:
41
I need to determine the field names of in html page containing
xml data island using javascript and Internet Explorer 5.5

The result.recordset.Fields.Count return 2 but a for loop is not
executed: it appears like Fields collection is empty.
How to retrieve recordset field names using Javascript in IE 5.5

Test .html file:
NOTE: double quotes are replaced to single quotes to allow UT to accept this code. Also, spaces are placed between tag names
<htm l> <bod y>

<xml id='result' javaDSOCompatible='true'>
<mytable xmlns:dt='urn:schemas-microsoft-com:datatypes'>
<row>
	<field1  dt:dt='string'>value1</field1>
</row>
</mytable>
</xml>

<scrip t>

// this returns 2
alert( 'Field count ' + result.recordset.Fields.Count );

// this for loop is not executed! Why?
for ( f in result.recordset.Fields )  
       alert( 'Field name ' + f.Name );
</scrip t>
</bod y></htm l>
Andrus
Répondre
Fil
Voir

Click here to load this message in the networking platform