Hi Mario,

���The correct Javascript syntax for selecting the first item of a listbox is

myListBox.selectedIndex = 0;

Cheers,

Peter

 From: "Mario Ramos (Ext)" [EMAIL PROTECTED]

Hi guys,

I'm trying to get the first item of a listbox selected on page load.

I got the control focused but how do I get the item selected?

I'm using in page_load:

Dim strBuilder As StringBuilder = New StringBuilder()

strBuilder.Append(" ")
 strBuilder.Append(" document.getElementById('lstbxLines').focus();")
 strBuilder.Append(" document.getElementbyid('lstbxLines').select()") ' 
strBuilder.Append(" ")

RegisterStartupScript("Focus", strBuilder.ToString())
'

Thankx

M�rio

M�rio Ramos
SADTEAM - Siemens Archibus Development Team
Servi�os IntegradosTM
Siemens Medical Solutions
Edif�cio Minho
Telf.: +351 22 999 22 84
Fax.: +351 22 999 22 88
Email: [EMAIL PROTECTED]


[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to