Get a Textbox control value

G

gg

Hi all, i have a textbox control in a module and i want to assign it's
value to a variable via javascript
(like this var a = textbox.text ) but i dont know how to get it.. i
find just example to assign a node value to a control.
There is a way? thx.
 
F

Franck Dauché

Hi gg,

first, you declare your node:
var node = XDocument.DOM.selectSingleNode("/my:myFields/.../my:FieldName");
where FieldName is your textbox name.
Then:
var a = node.text;

Hope that it helps.

Regards,

Franck Dauché
 
P

Pranav Wagh[MSFT]

As usual, frank is right...

Pranav Wagh

"The Real Stuff Is oUT oF tHE bOX"

http://blogs.msdn.com/pranavwagh
http://spaces.msn.com/members/pranavwagh
http://pranavwagh.blogspot.com

--------------------
From: "gg" <[email protected]>
Newsgroups: microsoft.public.infopath
Subject: Get a Textbox control value
Date: 5 Dec 2005 06:52:04 -0800
Organization: http://groups.google.com
Lines: 6
Message-ID: <[email protected]>
NNTP-Posting-Host: 81.208.55.131
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1133794330 29465 127.0.0.1 (5 Dec 2005 14:52:10
GMT)
X-Complaints-To: [email protected]
NNTP-Posting-Date: Mon, 5 Dec 2005 14:52:10 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT;
rv:1.7.12) Gecko/20050919 Firefox/1.0.7,gzip(gfe),gzip(gfe)
Complaints-To: [email protected]
Injection-Info: g47g2000cwa.googlegroups.com; posting-host=81.208.55.131;
posting-account=arGbfg0AAADxAXlDaebcK1WUlX3TshiK
Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.gigan
ews.com!postnews.google.com!g47g2000cwa.googlegroups.com!not-for-mail
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.infopath:25194
X-Tomcat-NG: microsoft.public.infopath

Hi all, i have a textbox control in a module and i want to assign it's
value to a variable via javascript
(like this var a = textbox.text ) but i dont know how to get it.. i
find just example to assign a node value to a control.
There is a way? thx.
 
G

gg

Everithing works well, but seem that infopath doesnt like the .text
attribute (error message : Object required)... why?
The node i choose is for sure the right one.
 
G

gg

Error solved... but now there is a new one... why after every action (i
launch an updating stored procedure by clicking a button) i can't do
anything?
I mean i click the button, the db is updated but if i change again the
data in the form and reclick the button appear an error box that says
"The query doesn't return any data".

In the form i have a dropdown that in the page load is populated by a
select from the db.
i think that the error is related to that dropdown but i dont know how.
 
F

Franck Dauché

Hi,

Are you using .Query() to refresh your secondary data source?

Franck
 
Top