This is a multi-part message in MIME format.

------=_NextPart_000_0076_01C5E45B.64187B10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Note: this post was sent to the four scripting groups on MS.
---------------------
I have loaded a ListBox on an HTA form but it displays the items in the =
order of the load; meaning it's sometimes NOT sorted.

In VB, there is a 'sorted' property for these objects. Is there also a =
'sorted' property for an HTA ListBox? Perhaps a 'style' or something?

I have looked on MS, Google'd, and search dozens of articles on MSDN but =
no luck. Maybe someone here has an idea?

many thanks,

--=20
Mark-Allen Perry
Beta ID: [160825 / 1112165]
ALPHA Systems
Marly, Switzerland
mark-allen_AT_mvps_DOT_org


------=_NextPart_000_0076_01C5E45B.64187B10
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1522" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3D"Comic Sans MS" color=3D#0000ff>Note: this post was =
sent to the=20
four scripting groups on MS.</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" =
color=3D#0000ff>---------------------</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#0000ff>I have loaded a =
ListBox on an HTA=20
form but it displays the items in the order of the load; meaning it's =
sometimes=20
NOT sorted.</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#0000ff></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#0000ff>In VB, there is a =
'sorted'=20
property for these objects.&nbsp; Is there also a 'sorted' property for =
an HTA=20
ListBox?&nbsp; </FONT><FONT face=3D"Comic Sans MS" =
color=3D#0000ff>Perhaps a 'style'=20
or something?</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#0000ff></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#0000ff>I have looked on MS, =
Google'd, and=20
search dozens of articles on MSDN but no luck.&nbsp; Maybe someone here =
has an=20
idea?</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#0000ff></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#0000ff>many =
thanks,</FONT></DIV><FONT=20
face=3D"Comic Sans MS" color=3D#0000ff>
<DIV><BR>-- <BR>Mark-Allen Perry<BR>Beta ID: [160825 / 1112165]<BR>ALPHA =

Systems<BR>Marly, Switzerland<BR>mark-allen_AT_mvps_DOT_org</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0076_01C5E45B.64187B10--

Re: Where is the SORTED property of a ListBox on an HTA form? by Bob

Bob
Tue Nov 08 06:13:18 CST 2005

Mark-Allen Perry wrote:
> Note: this post was sent to the four scripting groups on MS.
> ---------------------
> I have loaded a ListBox on an HTA form but it displays the items in
> the order of the load; meaning it's sometimes NOT sorted.
>
> In VB, there is a 'sorted' property for these objects. Is there also
> a 'sorted' property for an HTA ListBox?

No. There is no difference between an HTA SELECT element and an HTML SELECT
element.

You have to sort the items yourself before adding them. This is trivial if
retrieving the items from a database, or if using javascript (it's easy to
sort a javascript array). It's not so easy with vbscript - do a Google
search for "vbscript sort array" (no quotes)

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"



Re: Where is the SORTED property of a ListBox on an HTA form? by Mark-Allen

Mark-Allen
Tue Nov 08 07:24:29 CST 2005

Bob,

That's what I had imagined; MS designs stuff half-brained. It appears the
same group who designed WinPE to be missing half of Windows, also designed
HTAs. {sigh...}

Many thanks for the info and the suggestion. I've got some sort code and
will add it to the form.

have a nice day and thanks for the quick reply.

--
Mark-Allen Perry
Beta ID: [160825 / 1112165]
ALPHA Systems
Marly, Switzerland
mark-allen_AT_mvps_DOT_org


"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:Oxk0O3F5FHA.3384@TK2MSFTNGP11.phx.gbl...
> Mark-Allen Perry wrote:
> > Note: this post was sent to the four scripting groups on MS.
> > ---------------------
> > I have loaded a ListBox on an HTA form but it displays the items in
> > the order of the load; meaning it's sometimes NOT sorted.
> >
> > In VB, there is a 'sorted' property for these objects. Is there also
> > a 'sorted' property for an HTA ListBox?
>
> No. There is no difference between an HTA SELECT element and an HTML
SELECT
> element.
>
> You have to sort the items yourself before adding them. This is trivial if
> retrieving the items from a database, or if using javascript (it's easy to
> sort a javascript array). It's not so easy with vbscript - do a Google
> search for "vbscript sort array" (no quotes)
>
> Bob Barrows
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>



Re: Where is the SORTED property of a ListBox on an HTA form? by Bob

Bob
Tue Nov 08 07:38:58 CST 2005

Mark-Allen Perry wrote:
> Bob,
>
> That's what I had imagined; MS designs stuff half-brained.

In this case, it has nothing to do with MS. HTML was not designed by MS. IE
is not the only browser out there, remember.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Re: Where is the SORTED property of a ListBox on an HTA form? by mosow

mosow
Tue Nov 08 08:07:05 CST 2005

What about using a disconnected recordset (ADOR) rather than an array?
This has the ability to easily sort the items.


Re: Where is the SORTED property of a ListBox on an HTA form? by Bob

Bob
Tue Nov 08 08:28:43 CST 2005

:-) I'm not the one asking the question. I know how to sort data.
mosow wrote:
> What about using a disconnected recordset (ADOR) rather than an array?

ADOR is deprecated. An ad hoc ADODB recordset can certainly be used.

> This has the ability to easily sort the items.

I think the OP has a handle on sorting the data.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.