UniqueID Does Not Generate a Unique ID

From: Charles Law (blank_at_nowhere.com)
Date: 03/16/04


Date: Tue, 16 Mar 2004 13:31:54 -0000

I have a page containing a TABLE and two INPUT elements. They each have
their id attribute set to ms_id1 (for the TABLE element) and ms_id2 and
ms_id3 for the two INPUT elements.

I delete the first INPUT element (ms_id2) and then add a new INPUT element.
I use the IHTMLDocument3 interface on the document to call UniqueID, in
order to get a unique ID for the new element. The first call to UniqueID
returns ms_id1, which is not unique (it is assigned to the TABLE element).

How can I generate a unique id that is actually guaranteed to be unique.

TIA

Charles