Hi Jim,
If you are storing IDs and displaying Names with your drop-down (let's say
Texas is 47), then what you have to do is to select your node in the schema
and set its value to 47.
Does it make sense?
Regards,
Franck Dauché
> Can anyone provide me a snippet of code where an item in a drop-down-list is
> selected, probably via the onload event. For example, there is a drop-down of
[quoted text clipped - 3 lines]
> Thanks in advance,
> Jim
Jim - 09 Nov 2005 16:55 GMT
It does make sense, thanks. If you have a snippet handy, I'd appreciate it.
Thanks again,
Jim
> Hi Jim,
>
[quoted text clipped - 15 lines]
> > Thanks in advance,
> > Jim
Franck Dauché - 09 Nov 2005 17:22 GMT
Sure. Put the following C# code in the OnLoad:
IXMLDOMNode oField =
thisXDocument.DOM.selectSingleNode("/my:myFields/my:fieldLinkedToDropDown");
//replace by your own XPath
oField.text = "47";
Regards,
Franck Dauché
> It does make sense, thanks. If you have a snippet handy, I'd appreciate it.
>
[quoted text clipped - 20 lines]
> > > Thanks in advance,
> > > Jim
Jim - 09 Nov 2005 17:32 GMT
Oh, the same way one would handle populating like a textbox! I'm sorry, I
already knew how to do that. Thanks a bunch Frank!
> Sure. Put the following C# code in the OnLoad:
>
[quoted text clipped - 31 lines]
> > > > Thanks in advance,
> > > > Jim