html - Setting value for Dropdown -



html - Setting value for Dropdown -

for reason not beingness able populate dropdown box (html), here part of code:

ie.document.forms("ctl00_m_g_da21fae8_4ec1_4753_b9e0_4941851f566b_formcontrol0").item("v1_i1_s1_i1_d8").value = "seller" ie.document.forms("ctl00_m_g_da21fae8_4ec1_4753_b9e0_4941851f566b_formcontrol0").item("v1_i1_s1_i1_d8").fireevent ("onchange")

this part of html code dropdown webpage:

select tabindex=0 title="" class="ab_hz54nfzpwlwusncz_0 ad_hz54nfzpwlwusncz_0 he_hz54nfzpwlwusncz_0 g5_hz54nfzpwlwusncz_0" id=ctl00_m_g_da21fae8_4ec1_4753_b9e0_4941851f566b_formcontrol0_v1_i1_s1_i1_d8 aria-invalid=false style="direction: ltr" onfocus="return (dropdownlist.onfocus(this, event));" onblur="return (dropdownlist.onblur(this, event));" onchange="return (dropdownlist.onchange(this, event));" originalid="v1_i1_s1_i1_d8" formid="ctl00_m_g_da21fae8_4ec1_4753_b9e0_4941851f566b_formcontrol0" viewdatanode="16" direction="ltr" wrapped="true" scriptclass="dropdownlist"> <option value=""></option> <option value=csr>csr</option> <option value=distributor>distributor</option> <option value="lab tech" selected>lab tech</option> <option value=manager>manager</option> <option value=seller>seller</option> <option value=ts&amp;d>ts&amp;d</option> <option value=others>others</option> </select>`

what missing?

try ie.document.getelementbyid("ctl00_m_g_da21fae8_4ec1_4753_b9e0_4941851f566b_form‌​control0_v1_i1_s1_i1_d8").selectedindex = 5

html vba drop-down-menu

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -