Thanks in advance
Priya
Sorry I didn't quite get you. I want to be able to
automatically fill textboxes from the value displayed in
the dropdown. The dropdown is filled on a button click
event. but the list of values only shows when the
dropdown's arrow is clicked..I would just like to know if
it is possible to have the first value in the list
displayed (rather than blank)and accordingly textboxes
filled. Makes things simpler.
Thanks
Priya
>.
>
If you're setting the values in script, can't you just
set the first one as the current value? I think that's
what Stephen is getting at.
Can't remember the attribute, but it's something like:
myDropdown.selectedIndex = 1;
HTH
Perry
>.
>
XDocument.DOM.selectSingleNode
("//my:dropdown").selectedIndex=1;
And I get:
Object does not support this property or method.
Any idea??
Thanks
Priya
>.
>
>Hi Perry,
>Thanks for helping. But I tried:
>
>XDocument.DOM.selectSingleNode
>("//my:dropdown").selectedIndex=1;
>
>And I get:
>Object does not support this property or method.
>Any idea??
>Thanks
>Priya
Priya,
Try
XDocument.DOM.selectSingleNode("//my:dropdown[position()=1]")
or
XDocument.DOM.selectSingleNode("//my:dropdown[1]")
Andrew Watt
http://groups.yahoo.com/group/infopath/
http://groups.yahoo.com/group/xforms/
'Get a reference to the field we want to use as a key for the Web service
Dim fieldValue
set fieldValue = XDocument.DOM.selectSingleNode(
"/my:TwoDropDowns/my:DropDown1" )
'Get a reference to the SDS bound to the Web Service
Dim theDataObject
set theDataObject = XDocument.DataObjects.Item("GetFruitList")
'Set the SelectionNamesplaces so we can find the proper field
theDataObject.DOM.setProperty"SelectionNamespaces", _
"xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolut
ion"" xmlns:s0=""http://tempuri.org/"""
Dim queryValue
set queryValue = theDataObject.DOM.selectSingleNode( _
"/dfs:myFields/dfs:queryFields/s0:GetFruitList/s0:FruitIndex" )
queryValue.text = fieldValue.text
theDataObject.Query
'Set the value of the second dropdown
XDocument.DOM.selectSingleNode("/my:TwoDropDowns/my:DropDown2").text = _
theDataObject.DOM.selectSingleNode
"/dfs:myFields/dfs:dataFields/s0:GetFruitListResponse/s0:Fruit[0]/s0:Value"
XDocument.View.ForceUpdate
Thanks,
Joel Alley,MCSD
function XDocument::OnLoad(eventObj) // or you can use OnSwitchView()
{
var dom = XDocument.DOM;
// choose the first node from your repetitive data source
var firstNODE =
GetDOM("TheNameOfYourSecondaryDataSource").selectNodes("//Table").item(0).te
xt;
dom.selectSingleNode("//my:DropDownValue").text = firstNODE;
}
--
Bogdan HALCIUG
R&D Developer
L.I.M.S. (USA) INC.
Phone: (954) 964-8663 ext. 33
Fax: (954) 964-8113
bog...@starlims.com
Web: www.starlims.com
""Joel Alley [MSFT]"" <joe...@online.microsoft.com> wrote in message
news:eap0AJsf...@cpmsftngxa06.phx.gbl...