How do i add id attribute to my TWebListControl ?

Hi , 


i am manually creating the TwebListControl items property ,
and i wish to assign id to each of the item so that i can later using JS in my code to 
search and manipulate the element.

Is there a way to assign <li id="myid_1" class="some_class">...</li> ?

Thanks.

Hi , i can do it by in the onGetItemChildren , using the AElement , which is the <li> to call the setAttribute , but now , i face another challenge , how to i set the attribute for my link <a> item ?

<li id="ld_1">
    <a href="#" attr1="my attribute">link1</a>
<li>

how to add attri1 to my <a> tag above ? 
thanks.

Hi , Bruno , any chance for the request to be able to get around ? 

that is to get the link item , in the TWebListControl ,  to set it's attribute ? 

e.g. possible to add attributes to my <a href="#" attr1="my attribute">link1</a> which is 
       my TlistItem's link item.

thanks. 

With the method

TJSHTMLElement.setAttribute(attributename,attributevalue) , you can add a custom attribute

Hi ,thanks for your simple answer but it didn't help ,  i know about the above method , but my problem is that , in the onGetItemChildren , i do not know how to get the <a> element inside the <li> element  (as shown above), but the Alement in the event is pointed to <li> , what i want is to add attribute to the <a> NOT the <li>. IIs there any where i can get the targeted element inside the <;i> ?

You can loop through the children of the LI element (which is the element passed in the event).
I suspect the A element is the first element, as such, you could use 

AElement := LIElement.firstChild;
AElement.setAttribute(attributename,attributevalue)