I'm writing a firefox extension and I have a menulist of links that should be automatically (upon load) set to the last link it was set before I closed it. It just keep being set to the first menu item. I've tried using setAttribute('selectedIndex', 1), but that doesn't work. What am I doing wrong?
Some sample code:
<menulist>
<menupopup>
<menuitem label="default"/>
<menuitem label="I want this one to be selected" />
<menuitem label="Or this one." />
</menupopup>
</menulist>