Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > asp:dropdown call client side javascript on event?

Reply
Thread Tools

asp:dropdown call client side javascript on event?

 
 
soni2926@yahoo.com
Guest
Posts: n/a
 
      11-28-2007
hi,
i have a asp:dropwdown list on my page, it's populated with data (via
a dataset) on page_load. when a user selects a choice i want to call
a javascript function, is this possible? to have a client side event
called by a server control?

Thanks.
 
Reply With Quote
 
 
 
 
Wannabe
Guest
Posts: n/a
 
      11-28-2007
yes...you can attach a onchange event to the dropdown, in the code behind page:

ddTitle.Attributes.Add("onclick", "MyJavascriptCall()");

or

add onclick on the HTML page, with the name of the javascript function.



"(E-Mail Removed)" wrote:

> hi,
> i have a asp:dropwdown list on my page, it's populated with data (via
> a dataset) on page_load. when a user selects a choice i want to call
> a javascript function, is this possible? to have a client side event
> called by a server control?
>
> Thanks.
>

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      11-29-2007
You must have meant

ddTitle.Attributes.Add("onchange", "MyJavascriptCall()");

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Wannabe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> yes...you can attach a onchange event to the dropdown, in the code behind
> page:
>
> ddTitle.Attributes.Add("onclick", "MyJavascriptCall()");
>
> or
>
> add onclick on the HTML page, with the name of the javascript function.
>
>
>
> "(E-Mail Removed)" wrote:
>
>> hi,
>> i have a asp:dropwdown list on my page, it's populated with data (via
>> a dataset) on page_load. when a user selects a choice i want to call
>> a javascript function, is this possible? to have a client side event
>> called by a server control?
>>
>> Thanks.
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call a client-side vbscript from server-side button alan ASP .Net 2 09-15-2005 04:58 PM
How to call server side function for client side JavaScript? =?Utf-8?B?bGFuZW0=?= ASP .Net 3 03-30-2005 02:18 PM
how to call server-side methods from client side Dinšer ASP .Net 1 02-11-2005 06:06 PM
server-side vbscript call with javascript client-side David Shorthouse ASP General 2 02-03-2005 07:39 PM
Call server side code from client side Borr ASP .Net 2 11-10-2003 02:26 AM



Advertisments