???
You lost me. Below is some code I use to set focus on a control using
javascript. You pass it the ClientID (which will be the HTML ID when
rendered).
Also, getElementById wants the HTML "ID". Not sure what you mean "BY
NAME"...
Make sure the quotes in the getElement ById function don't trip you up.
Good luck.
Greg
SetFocus(txtPassword.ClientID)
Private Sub SetFocus(ByVal clientID As String)
Dim strjscript As String = "<script language=""javascript"">"
strjscript &= "document.getElementById(""" & clientID &
""").focus();"
strjscript &= "</script" & ">" 'Don't Ask, Tool Bug
Page.RegisterStartupScript("MYsetfocus", strjscript)
End Sub
"strout" <st****@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com...
This ID is in HTML attribute. client side.
"Greg Burns" wrote:
You need to use the .ClientID property not .ID property.
Greg
"strout" <st****@discussions.microsoft.com> wrote in message
news:81**********************************@microsof t.com... >I want to do some client-side operation by click different
>radiobuttonlist.
>
> I tried to add "onclick" event for each itemlist, by register startup
> clientside javascript. But the problem is I cannot get
> document.getElementById work, because the list item id generated by
> ASP.net
> is like myRdoList_0, myRdoList_1 ... and the names are "myRdoList".
> While
> document.getElementById is supposed to identify element BY NAME but not
> by
> ID
> attribute.
>
> Anyone has luck with this problem?
>
> strout