converting an object to be used in JScript (Script ID?)

R

RobertSRU1981

I created a text box in InfoPath non-SP1. I want to be able to use the input
from the text box and collect it. After i collect instantly when the person
clicks the submit button created. When the person clicks the submit button
the JScript will take over. First it will open two files (Which i have
allready figured out) then it will place all the information that they person
entered in two seperate files. The first file will make a formated file.txt
that will look like this.

First Name: John
Last Name: Doe
Age: 22
ect...

The second file will make a parsed file or delimited (by commas) file that
will look like this.
John,Doe,22,ect..

The problem i am having is trying to figure out how to convert a text box
object so it can be used into the JScript. I noticed that when you use
bottons you are asked to make a Script ID for that button so you can identify
it in the script. But it does not ask for a Script ID for a text box or
anything else for that matter. How do i collect whatever the user enters in
the text box so i can throw the information into a delimited file or
basically how can i change the text box info into a variable that can be used
in JScript?
 
H

Henning Krause [MVP - Exhange]

Hello,

thats not how InfoPath works.

You don't have access to the text-boxes. Instead you'll have to access the
underlying primary datasource (via XDocument.DOM).

This will look like XDocument.DOM.selectSingleNode("my:Fields/my:Age").text;

Greetings,
Henning Krause [MVP - Exchange]
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/software/mistaya.aspx)
 

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