Rea,
You don't need server controls in all cases. If you are populating the
combo box programmatically, then it'll need to be a server control. If not,
then just make it a regular html control and set onchange="myFunc(this);",
but if it's a server control, then follow Dale's suggestion. This puts that
onchange attribute there for you.
Best regards,
Jeffrey Palermo
"Dale" <da************@msndotcomNot.Net> wrote in message
news:u$**************@TK2MSFTNGP10.phx.gbl...
Assuming your DropDownList is ddl1, add this in your Page_Load():
ddl1.Attributes.Add("onchange", "myJavaScriptMethod(this)");
That'll do it for you.
Dale Preston
MCAD, MCSE, MCDBA
"Rea Peleg" <re******@barak-online.net> wrote in message
news:ev*************@TK2MSFTNGP12.phx.gbl... Hi all
Is it possible to handle web controls events on client side???
I wrote a simple favascript function inside the <header> area of an
aspx web form.
This function is called on selectedIndexChanged event of server side
radio button list,
but i can not get there . During compilation, it seems like the dotnet
asp service is looking for this function on that web form's (server side)
code behind instead
(this control's autoPostBack property is also set to false).
Am i right??
If so should i use regular html controls when i need to handle events on
client side?
I'm not sure i understand the advantage of using server side controls if
this is the case..