Hyperlink

Mc3762Mc3762 Member Posts: 26
edited 2002-03-01 in Navision Financials
I Have made a hyperlink from Navision to run an ASP page, which does some file-handling.

But the user doesn't need to see Internet Explorer. That is, is it possible to run the ASP page hidden from the user. So that when the ASP page has completed it shuts down Internet Explorer.

Comments

  • wonmowonmo Member Posts: 139
    You can probably use an automation variable to accomplish this. For example, the automation server Internet Explorer has the property VISIBLE. Try setting this property to FALSE.
  • Mc3762Mc3762 Member Posts: 26
    I have tried this code where IE is the automation variable

    Create(IE);
    Hyperlink('www.xxxxxx.com');
    IE.Visible := False;
    IE.Quit;

    But it doesn't do anything, and I need to close the Internet explorer.
  • wonmowonmo Member Posts: 139
    The code in your second line is the problem here. You have to use the instance of the automation variable when you connect. This will work:

    IE.Navigate('www.xxxxxx.com');

    Closing the connection will work with the Quit method. Hope this helps.
  • Mc3762Mc3762 Member Posts: 26
    Thanks that works....

    But, if I have an IE open before I run the code, it uses that instance of the IE and closes it.

    Is it possible to open a new IE instead, or to check if it was an existing IE it used, so that I can use the Back method instead...
  • wonmowonmo Member Posts: 139
    For the first line, use:

    CREATE(IE, TRUE);

    This will create a new instance of IE instead of trying to use the existing instance.
  • Mc3762Mc3762 Member Posts: 26
    Thanks

    A new problem came up.

    If Explorer to the filesystem is open. It doesn't work. when I run the Create(IE, True); it takes over the Explorer instead of creating a new Internet Explorer.

    How can I force it to open a new Internet Explorer.
  • Mc3762Mc3762 Member Posts: 26
    UPS.

    I debugged it, and have found out that teh problem is the Quit() statement.

    It starts up a new IExplorer, navigates. But as soon as i put IE.Quit(); after IE.Navigate('www.xxxx.com/test.asp'); It doesn't run the ASP code.
    It just quits IE, to early...
Sign In or Register to comment.