Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / September 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
G. Tarazi - 22 Sep 2004 14:54 GMT
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. Tarazi - 22 Sep 2004 15:21 GMT
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.

 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. Tarazi - 22 Sep 2004 15:34 GMT
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 ...............
 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 news:uu5pguKoEHA.3820@TK2MSFTNGP09.phx.gbl...
   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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.