General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Access XMetal Dev. API from inside a web application inside a Explorer ActiveX

  • Grimwolf

    Access XMetal Dev. API from inside a web application inside a Explorer ActiveX

    Participants 0
    Replies 1
    Last Activity 14 years ago

    Hello,

    Here is my setup – I create an additional tab inside the Resource Manager and put a Shell.Explorer.2 ActiveX in it. Then I load some web application in this ActiveX.

    if (!ResourceManager.Visible)
        ResourceManager.Visible = true;

    try {
        ResourceManager.AddTab(“MyTab”, “Shell.Explorer.2”);}
    catch (e) { }

    var webCtrl = ResourceManager.ControlInTab(“MyTab”);
    webCtrl.Navigate(“http://localhost:8400/”);
    ResourceManager.SelectTab(“MyTab”);

    Is there some way to access the XMetal API from inside this application (http://localhost:8400/)? I mean the objects like Application, Documents, ActiveDocument, etc.

    My idea is when I click some link inside the app to be able to access the API with JavaScript and perform some actions like pasting XML, selecting nodes, etc.

    Anyone got any idea?

    Reply

    Derek Read

    Reply to: Access XMetal Dev. API from inside a web application inside a Explorer ActiveX

    Yes. You can instantiate XMetaL Author as a COM object.

    Here's a JScript example that might be placed inside a function in an HTML page:
    [code]var xmapp = new ActiveXObject(“XMetaL.Application”);
    xmapp.Alert(“hello world”);
    xmapp = null;[/code]

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support