Task Pane lookup - InfoPath Dev
in

InfoPath Dev

Task Pane lookup

Last post 06-30-2006 04:29 AM by Shiva. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-28-2006 03:08 PM

    Task Pane lookup

    Hi

    I implemented urn-based fully trusted infopath form for one our current projects. The infopath form has custom task pane for the action buttons which are dynamically created. To create custom pane, I added myHTML.htm in resources and select this resource file as task panehtml. The Javascript code of myHTML.htm as follows:

    But I got "Permission denied"
    Javascript error in the function "Init()", when client side code was executed.

    var gobjXDocument = null;

    function Init()
    {
    gobjXDocument = window.external.Window.XDocument;
    }

    function asignar(nombreSP, adscripcion)
    {
    var myField;
    Init();
    var objMetaNodes = gobjXDocument.View.GetSelectedNodes();
    if(objMetaNodes.Count > 0)
    {
    myField = objMetaNodes.Item(objMetaNodes.Count - 1);
    myField = myField.selectSingleNode("./my:titularDestino");
    myField.text = nombreSP;
    myField = objMetaNodes.Item(objMetaNodes.Count - 1).selectSingleNode("./my:areaDestino");
    myField.text = adscripcion;
    }
    else
    {
    gobjXDocument.UI.Alert("Seleccione el área en donde se asignarán los datos.");
    }
    }

    Help me please...


  • 06-30-2006 04:29 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694
    Follow these steps to get the XDocument reference

    1. Go to "Tools->FormOptions->Advanced->Select 'Enable Custom Taskpane'
    2. Select your HTML page in the dropdown.
    3. Click ok.

    You can get reference to the XDocument in the taskpane with the following line of code

    "window.external.Window.XDocument;"

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