Accessing TaskPane window from onLaod function of Infopath form

R

Renjith

hi,

I want to load some data to a html page in the TaskPane. I wrote a script in
"onLaod" fuction of Infopath form. But this gives a null reference for the
task pane object.
(objTaskPane = XDocument.View.Window.TaskPanes.Item(0).HTMLWindow;)

But when I write the same script in the "onClick" of a button it works fine.

How can I achieve the same through onLoad ?


Thanks
Renjith
 
B

Brian Teutsch [MSFT]

I don't believe the task pane is available during the onLoad event. You'll
probably have to have the task pane reference XDocument or a data source
when it loads.

Brian
 
R

Renjith

Thanks Greg, that worked.


"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in
message Yes, you can use an OnLoad function in your task pane that initiates the
function in your form which will load the data.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



I don't believe the task pane is available during the onLoad event. You'll
probably have to have the task pane reference XDocument or a data source
when it loads.

Brian
 

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