This should help give you an idea of how to do what you want
Below is the HTML that was used in the above exampleCode:Dim MyURL As String Private Sub Command1_Click() MyURL = App.Path & "\Test.html" WebBrowser1.Navigate MyURL End Sub Private Sub Form_Load() MyURL = "NOTHING" End Sub Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) If InStr(URL, MyURL) > 0 Then ' ' Change the value= argument of the combo box ' WebBrowser1.Document.All("mycombo").Options(0).Value = "" WebBrowser1.Document.All("mycombo").Options(1).Value = "Friend" WebBrowser1.Document.All("mycombo").Options(2).Value = "Movie" WebBrowser1.Document.All("mycombo").Options(3).Value = "Shopping" WebBrowser1.Document.All("mycombo").Options(4).Value = "TV" WebBrowser1.Document.All("mycombo").Options(5).Value = "Golf" ' ' Change the text of the dropdown items of the combo box ' WebBrowser1.Document.All("mycombo").Options(0).innerText = "**Select One**" WebBrowser1.Document.All("mycombo").Options(1).innerText = "[Friend's House]" WebBrowser1.Document.All("mycombo").Options(2).innerText = "[Movie Show]" WebBrowser1.Document.All("mycombo").Options(3).innerText = "[Shopping]" WebBrowser1.Document.All("mycombo").Options(4).innerText = "[Watching TV]" WebBrowser1.Document.All("mycombo").Options(5).innerText = "[Playing Golf]" ' ' Make the 3rd item in the dropdown the current selected item ' WebBrowser1.Document.All("mycombo").Options(3).Selected = True End If End Sub
Test.html
Code:<html> <body> <SCRIPT type=text/javascript> function menu_goto_footer(menuform) { selecteditem = menuform.footer_links.selectedIndex; varLinks = menuform.footer_links.options[ selecteditem ].value; varTitle = menuform.footer_links.options[ selecteditem ].title; if (varLinks.length != 0 && varLinks != varTitle && varLinks != '#') { //location.href = varLinks; window.open(varLinks,'',''); } else if(varLinks != '#') { window.open(varLinks,'',''); } } </SCRIPT> <form> <SELECT onchange=menu_goto_footer(this.form) name=mycombo> <option value="">(no prefix)</option> <option value="home" >[Home]</option> <option value="school" >[School]</option> <option value="working" >[working]</option> <option value="studing" >[Studying]</option> <option value="playing" >[Playing]</option> </select> <form> </body> </html>
I didn't use the link you posted because the page data is too long and this one is very small but it should give you the idea of how to do it




Reply With Quote
