here is a dropdown example.

code:

break on


$htmlform = @curdir + "\dropdown.html"
$csv = @curdir + "\SIB.csv"
$cr = chr(13) + chr(10)
gosub html


$false = 0
$true = -1


$ie = olecreateobject("internetexplorer.application")
if $ie = 0 exit endif


; Set properties and display form ...


$nul = oleputproperty($ie, "addressbar","s","$false")
$nul = oleputproperty($ie, "menubar", "s", "$false")
$nul = oleputproperty($ie, "toolbar", "s", "$false")
$nul = oleputproperty($ie, "statusbar", "s", "$false")
$nul = oleputproperty($ie, "resizable", "s", "$false")
$nul = oleputproperty($ie, "top", "s", "100")
$nul = oleputproperty($ie, "left", "s", "200")
$nul = oleputproperty($ie, "height", "s", "165")
$nul = oleputproperty($ie, "width", "s", "275")
$nul = oleputproperty($ie, "visible", "s", "$true")
$nul = olecallfunc($ie, "navigate", "s", "about:blank")


while olegetproperty($ie, "busy") <> "0" and @error = 0 loop


; Get a handle to the open document ...
$doc = val("&" + olegetproperty($ie, "document"))
$nul = olecallfunc($doc, "write", "s", "$htmlform")
while setfocus("Dropdown Menu") <> 0 loop ;-------------------------This now works!!!


; Get a handle to the form controls ...
$oStatus = val("&" + olecallfunc($doc,"GetElementById","s","status"))
$oDropdown = val("&" + olecallfunc($doc, "GetElementById","s","dropdown"))

; Main Command Loop
while @error = 0
; Get the valueof the status control ...
$mStatus = olegetproperty ( $oStatus, "value" )
select
case $mStatus = "1"
; Submit was clicked
; Get the Fullname value / clear form...
$dropdown = olegetproperty($oDropdown, "value")
? $dropdown


; Reset the status value to zero ...
$nul = oleputproperty($oStatus,"value","s","0")


case $mStatus = "2"
;close was clicked.
goto finish
endselect
loop


:finish


; Object cleanup ...
$nul = olecallfunc ( $doc, "close" )
$nul = olereleaseobject ( $doc )
$nul = olecallfunc ( $ie, "quit" )
$nul = olereleaseobject ( $ie )
$nul = setconsole ( "show" )
$nul = setconsole ( "foreground" )


exit


:HTML
$htmlform = '<html>' + $cr +
'<head><title>Dropdown Menu</title>' + $cr +
'<style><!---body{ background-color: silver; color: black;' + $cr +
' font-family: tahoma, arial; font-size: 10pt; margin: 3px "' + $cr +
' input.tbox { border: lpx black solid;}' + $cr +
' td { font: 10pt tahoma; }' + $cr +
' ---></style>' + $cr +
'</head>' + $cr +
'<body scroll=no>' + $cr +
'' + $cr +
'<form name=frm>' + $cr +
'<SELECT Id=dropdown>' + $cr +
' <OPTION value=nul>--- Select An Option ---</OPTION>' + $cr +
' <OPTION value=Option1>Option1</OPTION>' + $cr +
' <OPTION value=Option2>Option2</OPTION>' + $cr +
' <OPTION value=Option3>Option3</OPTION>' + $cr +
' <OPTION value=Option4>Option4</OPTION>' + $cr +
' <OPTION value=Option5>Option5</OPTION>' + $cr +
' <OPTION value=Option6>Option6</OPTION>' + $cr +
' <OPTION value=Option7>Option7</OPTION>' + $cr +
' <OPTION value=Option8>Option8</OPTION>' + $cr +
' <OPTION value=Option9>Option9</OPTION>' + $cr +
' <OPTION value=Option10>Option10</OPTION>' + $cr +
' <OPTION value=Option11>Option11</OPTION>' + $cr +
' <OPTION value=Option12>Option12</OPTION>' + $cr +
'</SELECT>' + $cr +
'<input type=hidden id=status value=0><p>' + $cr +
'<input id=enter type=button value=" Submit " onclick="frm.status.value=1">' + $cr +
'<input id=close type=button value=" Close " onclick="frm.status.value=2">' + $cr +
'</form></body>' + $cr +
'</html>' + $cr

return


[This message has been edited by Bryce (edited 08 September 2000).]

[This message has been edited by Bryce (edited 11 September 2000).]