<p>I have a BulletedList in asp.net that is set to DisplayMode="LinkButton". I would like to trigger the first "bullet" from a javascript, can this be done? And if so, how?</p>

Say you have the BulletedList as
```
```
<asp:BulletedList runat="server" ID="MyLovelyBulletedList" DisplayMode="LinkButton">
    <asp:ListItem Text="My Lovely Text 1" />
    <asp:ListItem Text="My Lovely Text 2" />
</asp:BulletedList>
```
```
... then you can fire the "onclick" event like this (cross-browser):
```
```
var links = document.getElementById('<%= MyLovelyBulletedList.ClientID %>').getElementsByTagName('a');

var targetLink = links[0];

if (targetLink.fireEvent)
{
    // IE
    targetLink.fireEvent("onclick");
}
else if (targetLink.dispatchEvent)
{
    // W3C
    var evt = document.createEvent("MouseEvents");

    evt.initMouseEvent("click", true, true, window,
        0, 0, 0, 0, 0, false, false, false, false, 0, null);

    targetLink.dispatchEvent(evt);
}
```
```