axWebBrowser DocumentComplete With ComboBox RRS feed

  • Question

  • if select 2=index 3

    The third ComboBox….. The third ComboBox d`not work if  work second ComboBox

    pleas help

            private void axWebBrowser1_DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
                mshtml.HTMLDocument _doc = this.axWebBrowser1.Document as mshtml.HTMLDocument;
                mshtml.IHTMLElement name1 = _doc.getElementById("ctl00_PlaceHolderMain_ddlProceedingRPTLevel");
                if (name1 != null) 
                    name1.setAttribute("selectedIndex", 2);
                    name1.setAttribute("selected", "selected");

    but 3 dropbox d'not work

    DocumentComplete d`not work with the dropbox

    Wednesday, November 13, 2019 1:34 PM


All replies

  • Hi AL3ANEED,

    Could you please explain the statement "if select 2=index 3" and "The third ComboBox don't work if work second ComboBox"?

    In your code, there is no statement about ComboBox. And what is the "mshtml" you defined?

    It would be better if you can explain them in detail.

    Best Regards,

    Daniel Zhang

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 14, 2019 2:55 AM
  • I can't speak English.
    Is there technical support in Arabic?
    Thursday, November 14, 2019 8:15 AM
  • DocumentComplete Don't work with ComboBox
    Thursday, November 14, 2019 9:08 AM
  • The combobox items are probably create by javascript code that runs some time after DocumentComplete. A simple fixed length wait may or may not make the combobox filled (it will be up to the author of that website). 

    Visual C++ MVP

    Thursday, November 14, 2019 10:21 PM
  • Maybe this is the Forum for arabic language:


    Regards, Guido

    (But I cannot read arabic)
    Friday, November 15, 2019 10:03 AM