Programmatically invoke a hyperlink

S

sunflower

I want the user of my Infopath form to click a button and the following
actions done automatically:
(a) submit the document to a webservice
(b) invoke a webpage

Does anyone know how to do this?
 
F

Franck Dauché

Hi,

You could do it by code:

You can use:
XDocument.Submit(); to submit your code.

To launch a Web Page, you can use:
var oIE;
oIE = new ActiveXObject("InternetExplorer.Application");
oIE.Visible = true;
oIE.navigate("http://www.mypage.com");


Regards,

Franck Dauché
 
S

sunflower

Thanks Franck,

I get the following error when I invoke it:

The following error occurred:

Automation server can't create object
File:script.js
Line:52

Any ideas? We have a rather locked down setup here and I am just wondering
if it is a security setting somewhere that I need to switch on/off.
 
F

Franck Dauché

Try Full Trust

Regards,

Franck Dauché


sunflower said:
Thanks Franck,

I get the following error when I invoke it:

The following error occurred:

Automation server can't create object
File:script.js
Line:52

Any ideas? We have a rather locked down setup here and I am just wondering
if it is a security setting somewhere that I need to switch on/off.
 
Top