0 Replies Latest reply: May 19, 2011 1:55 AM by Depakjan RSS

    Form xml how to get the metadata info in JS

      We have form which stores the data in an XML format as below

      Now this xml always stores some info between <metadata> tags and i have to use one of this in my Javascript.

      For example fId value i need it in my JS, how do i get it

      i can get the field name valuse like CSb by using document.getElementById("CSb").value

      but if i use the same document.getElementById("fId").value , it does not return anything , why is this.. is there any way how we can read the metadata info in Javascript??

      or is there a way to scan all the XML contents and parse and get the value of fId from this xml .. any ideas?

      also form even displays fId but still i just cant get the value in my code..
      <?xml version="1.0" encoding="UTF-8"?>
      <form><metadata><prop name="cid"><value>Cs-1</value></prop>
      <prop name="cd"><value>3611</value></prop>
      <prop name="fTId"><value>A_A_DI</value></prop>
      <prop name="fId"><value>0205</value></prop></metadata>
      <field name="CSb" type="String"><value>1</value></field><field name="CSC" type="String"><value>318</value></field><field name="CSC" type="String"><value>92</value></field><field name="CSId" type="Integer"><value>200917</value></field><field name="ald" type="Integer"><value>00089</value></field>