How to open optional section in jscript - InfoPath Dev
in

InfoPath Dev

How to open optional section in jscript

Last post 07-29-2008 12:51 AM by Shiva. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-28-2008 06:39 AM

    How to open optional section in jscript

    Hi!
    In my form there is an optional section hide by default. I wuold like to open it by Jscript Code. On this forum I forum I found this solutions:

    string sXml = "<my:group1 xmlns:my='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-04-13T11:32:39'><my:field1/></my:group1>";
    IXMLDOMDocument oXml = thisXDocument.CreateDOM();
    oXml.async = false;
    oXml.loadXML(sXml);
    getNode("//my:myFields").appendChild(oXml.documentElement);

    but it is in c#. Could you help me to do the same thing but with jscipt?
    Thank You.

    Giorgio

  • 07-29-2008 12:51 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: How to open optional section in jscript

    Hello,

    Here is the code, 

    Hello,

    Here is the code,

    var sXml = "<my:group1 xmlns:my='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-04-13T11:32:39'><my:field1/></my:group1>"

    var xmlDoc = XDocument.CreateDOM()

    xmlDoc.async = false

    xmlDoc.load(sXml)

    XDocument.DOM.selectSingleNode("/my:myFields").appenChild(xmlDoc.documentElement)

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.