Event handlers inside the html task pane, is it possible?

G

G. Tarazi

Hi



I have a C#/InfoPath form, and a task pane that is Java Scrip + HTML, now I want to change a value from InfoPath, and I would like to trigger the on change event inside the task pane, is that possible?



And another thing, I know a workaround but that requires a full trust of the form, and I don't want to do that, developing a fully trusted form using C# is a painful experience.



Any ideas



Thank you.
 
G

G. Tarazi

Found a new way :)

// The task pane
mshtml.HTMLWindow2Class window = (mshtml.HTMLWindow2Class) this.m_refMap.HtmlTaskPane.HTMLDocument.Script;

// The test script
window.execScript("SetTitle('a')","JScript");

And the evnet is handled in InfoPath.


"G. Tarazi" <Tarazi (at) LiveTechnologies.ca> wrote in message Hi



I have a C#/InfoPath form, and a task pane that is Java Scrip + HTML, now I want to change a value from InfoPath, and I would like to trigger the on change event inside the task pane, is that possible?



And another thing, I know a workaround but that requires a full trust of the form, and I don't want to do that, developing a fully trusted form using C# is a painful experience.



Any ideas



Thank you.
 
G

G. Tarazi

And as usual it will not work from the first time :-(

System.Runtime.InteropServices.COMException
Could not complete the operation due to error 80020101.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at mshtml.HTMLWindow2Class.execScript(String code, String language)
at ...............
"G. Tarazi" <Tarazi (at) LiveTechnologies.ca> wrote in message Found a new way :)

// The task pane
mshtml.HTMLWindow2Class window = (mshtml.HTMLWindow2Class) this.m_refMap.HtmlTaskPane.HTMLDocument.Script;

// The test script
window.execScript("SetTitle('a')","JScript");

And the evnet is handled in InfoPath.


"G. Tarazi" <Tarazi (at) LiveTechnologies.ca> wrote in message Hi



I have a C#/InfoPath form, and a task pane that is Java Scrip + HTML, now I want to change a value from InfoPath, and I would like to trigger the on change event inside the task pane, is that possible?



And another thing, I know a workaround but that requires a full trust of the form, and I don't want to do that, developing a fully trusted form using C# is a painful experience.



Any ideas



Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top