Post by g***@pnmac.comBut is there any way I can select values from a selectized IE dropdown?
I still don't know what you're saying. :)
You want to set the selected item? Or
retrieve a value? This sample should
demonstrate your options:
<HTML><HEAD>
<SCRIPT LANGUAGE="VBScript">
Sub window_onload()
For i = 1 to 8
Set Opt = document.createElement("OPTION")
Opt.text = CStr(i)
Opt.value = CStr(i)
dropbox.add Opt
Set Opt = Nothing
Next
'-- note this will show "6" because the index is 0-based.
dropbox.selectedIndex = 5
End Sub
Sub dropbox_onchange()
Lab1.innerText = dropbox.value
End Sub
</SCRIPT>
</HEAD>
<BODY>
<SELECT ID="dropbox" SIZE=1>
</SELECT>
<LABEL ID="Lab1"></LABEL>
</BODY></HTML>
------------------------------
You can also write subs for click and
doubleclick events. For instance, if you
want multi-select, you could set the size
above to 8, then retrieve the selectedIndex
with each click or onchange, then do
something like set the backcolor red for
that item and keep a record of which
are red. A javascript library is doing the
dsame thing. It's just packaging the details.
You might want to get the help file for this.
It's hard if you don't have a reference because
the document object model is so vast. In this
case you'd want the DHTML help. I keep a
snippet of instructions for just this kind of
thing:
1)
This link should work to get the real ISO of the Win7 SDK
rather than a nonsense "web installer" link:
https://download.microsoft.com/download/2/E/9/2E911956-F90F-4BFB-8231-E292A7B6F287/GRMSDK_EN_DVD.iso
Otherwise, try this and make sure you get the
X86 version:
https://www.microsoft.com/en-us/download/details.aspx?id=18950
2)
Open the ISO using 7-Zip. Inside the Setup\WinSDKDocWin32
folder, take out cab5.cab. Inside that, find and extract this file:
WinSDK_DHTML_hxs_......
3)
Go here to get the HXS to CHM converter:
https://www.jsware.net/jsware/hxs2chm.php5
(You'll also need to download Microsoft's free
HTML Help Workshop.)
4)
With that you can get yourself a WMI CHM reference that
includes all methods, classes, etc. The HXS to CHM converter
might require a bit of setup -- it needs the help workshop
and 7-Zip paths to work -- but once set up the conversion
is basically a 1-click operation.
Anyone who wants other docs might want to convert
the whole shebang: Extract all 6 CABs from the help folder
and use the converter to convert them all to CHM in one
shot. Then you get Windows Script Host, IE DOM, shell....
pretty much anything that MS has docs for -- which takes
forever to look up online -- has a corresponding help file.
With that you end up with full, accessible, local help,
but without the gargantuan bloat of a full Windows SDK
installation, and without the help files being limited
in terms of how you can read them. All Windows versions
support CHM help files as a native format.