Newbie Q ... setting field values on an event

S

Sean M

I'm just getting started here ... and am looking for a little help. How do
you set the value of a field (via JS) on an event such as "OnLoadEvent" or
"OnAfterChange" ? If anyone can share a little code sample I would be very
grateful. Thanks Sean
 
F

Franck Dauché

Hi Sean,

Use XDocument.DOM.selectSingleNode(YourXPath).text = "test";
Your XPath is something such as: "my:myFields/my:......./my:fieldName"

Why don't you look at the samples that shipped with InfoPath, you will see a
lot of JScript code there.

Regards,

Franck Dauché
 
S

Sean M

thanks!

Franck Dauché said:
Hi Sean,

Use XDocument.DOM.selectSingleNode(YourXPath).text = "test";
Your XPath is something such as: "my:myFields/my:......./my:fieldName"

Why don't you look at the samples that shipped with InfoPath, you will see a
lot of JScript code there.

Regards,

Franck Dauché
 
F

Franck Dauché

You are welcome.
Good luck with your InfoPath developments.

Franck Dauché
 

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