Search:
Namespaces
Discussions
.NET v1.1
Feedback
aspx web form controls and client side java script
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.languages.jscript
.
Post a new message to this list...
Rea Peleg
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..
Reply to this message...
bruce barker
the OnClick for asp.net server is a serverside event. to catch client events
use the "onclick" attribute. note some server controls are really a span
with children, so the event will be on the span.
-- bruce (sqlwork.com)
"Rea Peleg" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
[Original message clipped]
Reply to this message...
Rea Peleg
Thanks bruce
I tried the attribute trick but it would not work for asp controls.
Just for html ones..
Any thing i may be missing here?
Also i did not understand the concept of span control?
Thanks again
Rea
"bruce barker" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
> the OnClick for asp.net server is a serverside event. to catch client
events
[Original message clipped]
Reply to this message...
bruce barker
to understand webserver controls from the client side, you have to look at
the html rendered. some server controls render themselves inside a span,
which is rendered with the control id. setting additional properties of
attributes will be rendered on the span, not the containing control.
in the case of a radio list, a html table is rendered with the control id,
and radio controls inside rows. setting the attributes of the server
control will set properties on the table. there is no client side equilvant
to selectedIndexChanged. you could attach onclick or onchange handlers to
the radio controls to figure it out. you would have to client script to find
and attach the handlers though.
-- bruce (sqlwork.com)
"Rea Peleg" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
[Original message clipped]
Reply to this message...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com