Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
14 Points
5 Posts
Jan 11, 2010 09:19 PM|LINK
Thanks a lot for the idea!!! It looks a little differently in LTAF:
HtmlElementFindParams countryFindParams = new HtmlElementFindParams();
countryFindParams.TagName = "option";
countryFindParams.InnerText = "USA";
int nCountryIndex = Country.ChildElements.IndexOf(Country.ChildElements.Find(countryFindParams));
if (nCountryIndex > -1)
Country.SetSelectedIndex(nCountryIndex);
Dmitriy Kozh...
Member
14 Points
5 Posts
Re: How to set value to the selectbox?
Jan 11, 2010 09:19 PM|LINK
Thanks a lot for the idea!!! It looks a little differently in LTAF:
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> HtmlElementFindParams myCountryParams = new HtmlElementFindParams(); </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> myCountryParams.TagName = "option";</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> myCountryParams.InnerText = "Ukraine";</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> HtmlElement myCountry = Country.ChildElements.Find(myCountryParams);</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> int nCountryIndex = Country.ChildElements.IndexOf(myCountry);</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> if (nCountryIndex > -1)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Country.SetSelectedIndex(nCountryIndex); </div> <div></div>HtmlElementFindParams countryFindParams = new HtmlElementFindParams();
countryFindParams.TagName = "option";
countryFindParams.InnerText = "USA";
int nCountryIndex = Country.ChildElements.IndexOf(Country.ChildElements.Find(countryFindParams));
if (nCountryIndex > -1)
Country.SetSelectedIndex(nCountryIndex);
<div></div><div>-----</div><div>Dmitriy</div>