dojo - Changing option value in dropdown item using excel vba -
i new learner programming , new excel-vba , learning scraping through it. trying programmatically change color on website having below html
<div><select id="color" name="color" data-dojo- type="dijit.form.filteringselect"><option value="orange">orange</option><option value="green" selected="selected">green</option><option value="yellow">yellow</option></select></div> ie1.document.getelementbyid("color").value = "orange" ie1.document.getelementbyid("color").focus ie1.document.getelementbyid("color").click
after doing can see "orange" being written on dropdown on webpage when submit form on website considers default selected "green" value , not changed value "orange". tried focus , click still no luck.
could please me out here? tried searching existing vba solution not find any. think dijit.form.filteringselect making unique.
you have change value using dijit tools. first command grabs widget dojo's widget registry. second command changes it.
var fs = dijit.registry.byid("color"); fs.set("value","orange");
Comments
Post a Comment