DHTML 
Author Message
 DHTML

Hi,

Does anybody know how to add elements to a dropdown box in a DHTML Apllication at
runtime???

Thanks,



Fri, 15 Aug 2003 17:49:33 GMT  
 DHTML
Something similar to this should work for populating a HTML listbox (VB):

    Dim lst As MSHTML.HTMLSelectElement
    Dim opt As MSHTML.HTMLOptionElement
    Dim doc As MSHTML.HTMLDocument

    Set doc = WebBrowser1.Document
    Set lst = doc.getElementById("MyListBoxNameGoesHere")
    Set opt = doc.createElement("OPTION")
    '-- Next, set all properties of the list option, such as color and text
    opt.Style.Color = &HFF0000
    opt.innerText = "Test Listbox Item"
    lst.appendChild opt

    Set lst = Nothing
    Set opt = Nothing
    Set doc = Nothing

HTH,
Jon


Hi,

Does anybody know how to add elements to a dropdown box in a DHTML
Apllication at
runtime???

Thanks,



Fri, 15 Aug 2003 21:58:31 GMT  
 DHTML
Thanks, for the tip Jon!!

*** Sent via Developersdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!



Sat, 16 Aug 2003 19:20:29 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Visual Basic 6 and DHTML - How do i access Dhtml Object

2. Hosting the DHTML Editing Component (DEC) in Access 97/2000 - SOLUTION

3. DHTML Edit Control, RTF Edit Control, Access 97 Client, SQLServer 7.0 Back End

4. http://welcome.to/dhtml-world

5. vba dhtml and xml

6. Attaching Events to DHTML in VB.Net

7. DHTML Dialog Designer for VB

8. DHTML Edit Control for VB.net

9. Dhtml Active X Control

10. DHTML Edit Control

11. DHTML user interfaces

12. Shape,Line,DHTML,ActiveX Docs

 

 
Powered by phpBB® Forum Software