I have this form on a site with dependent combobox.
When updating the first combobox (state) through vba, the second combobox (municipality) need to populate your list.
I've tried this way:
Set ie = New InternetExplorer
ie.Visible = True
ie.Navigate "http://www2.correios.com.br/sistemas/agencias/"
Do Until (ie.ReadyState = 4)
Loop
'First combobox
ie.Document.all("estadoAgencia").Item(2).Selected = True
ie.Document.all("estadoAgencia").Item(2).Focus
ie.Document.all("estadoAgencia").Item(2).Click
ie.Document.all("estadoAgencia").Item(2).FireEvent ("onChange")
'Second combobox
ie.Document.all("municipioAgencia").Item(2).Selected = True 'Do not work here, this last line
I think I have to call some function using the method: ie.Document.parentWindow.execScript ("functionname()")
But I could not find the function to call in this lines.
<script type="text/javascript">/* <![CDATA[ */
var _cf_cfcAgencia=ColdFusion.AjaxProxy.init('/sistemas/agencias/cfc/cfcAgencia.cfc','ProxyAjax');
_cf_cfcAgencia.prototype.getAgenciasProximas=function(latitude,longitude) { return ColdFusion.AjaxProxy.invoke(this, "getAgenciasProximas","45A0BE8C97B5F00E", {latitude:latitude,longitude:longitude});};
_cf_cfcAgencia.prototype.getBairro=function(UF,municipio) { return ColdFusion.AjaxProxy.invoke(this, "getBairro","45A0BE8C97B5F00E", {UF:UF,municipio:municipio});};
_cf_cfcAgencia.prototype.getUF=function() { return ColdFusion.AjaxProxy.invoke(this, "getUF","45A0BE8C97B5F00E", {});};
_cf_cfcAgencia.prototype.getMunicipio=function(UF) { return ColdFusion.AjaxProxy.invoke(this, "getMunicipio","45A0BE8C97B5F00E", {UF:UF});};
/* ]]> */</script>
I believe that can be:
_cf_cfcAgencia.prototype.getMunicipio=function(UF)
Somebody can help me?