Convertion Jscript in C# - InfoPath Dev
in

InfoPath Dev

Convertion Jscript in C#

Last post 01-17-2006 06:30 AM by Shanthi Reddy. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-12-2006 02:18 AM

    Convertion Jscript in C#

    Hi,

    I have the following probleme I try to translate some example in Jscript to C#. But I am not very good in Jscript so I need your help!

    Here is the line that I don't understand :

    // Show a modal dialog with a size of 400x600 and using Import.htm for
    // its contents. The XDocument object is passed as a dialog parameter
    // and the number of CDs which were imported is returned.
    var intImported = XDocument.View.Window.TaskPanes.Item(0).HTMLDocument.
    parentWindow.showModalDialog("Import.htm", XDocument,
    "status:no;help:no;resizable:yes;dialogHeight:400px;dialogWidth:600px");


    Can someone explain or translate me this little code?

    Thanks for your help!

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 01-15-2006 10:51 PM In reply to

    Re: Convertion Jscript in C#

    Hi,

    Nobody has an idea?

    My problem is that in Jscript I have:

    XDocument.View.Window.TaskPanes.Item(0).HTMLDocument.
    parentWindow.showModalDialog("....");

    but in C# I can make:

    thisXDocument.View.Window.TaskPanes[0]

    Bit if I try to make .HTMLDocument this is not recognize why?

    I have search in the object browser to find another method but I didn't find it!

    Is there another way?

    Thanks

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 01-15-2006 11:29 PM In reply to

    Re: Convertion Jscript in C#

    Sorry Thierry,
    I'll ask Agni to respond. He's been doing a bunch of conversion lately.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 01-17-2006 12:23 AM In reply to

    Re: Convertion Jscript in C#

    Hi Thierry,
    HTMLDocument is property of HTMLTaskPane. HTMLDocument property type is IHTMLDocument2.

    You have the details about IHTMLDocument2 at the following link.
    http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/ifaces/document2/document2.asp

    Agni
    InfoPath Dev India
  • 01-17-2006 06:30 AM In reply to

    Re: Convertion Jscript in C#

    One thing to remember is that when you access the taskpane from managed code you will have to give full trust to the form.

    Shanthi
    InfoPath Dev India
    Shanthi Reddy
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.