Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Client-side scripting on server control

Reply
Thread Tools

Client-side scripting on server control

 
 
Mantorok
Guest
Posts: n/a
 
      07-07-2005
Hi all

Is it possible to have client-side scripts executed from server controls, I
have a BulletList control and when they click on an item in the list I need
some javascript to be executed.

Thanks
Kev


 
Reply With Quote
 
 
 
 
Mantorok
Guest
Posts: n/a
 
      07-07-2005

"Eliyahu Goldin" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Kev,
>
> You need to attach client-side events to the control. You need to
> understand
> what HTML elements the control renders as and how to get to the elements
> from server code.


Do you have any examples or guidance for me on achieving that?

Thanks
Kev

>
> "Mantorok" <(E-Mail Removed)> wrote in message
> news:dajdtd$8kq$(E-Mail Removed)...
>> Hi all
>>
>> Is it possible to have client-side scripts executed from server controls,

> I
>> have a BulletList control and when they click on an item in the list I

> need
>> some javascript to be executed.
>>
>> Thanks
>> Kev
>>
>>

>
>



 
Reply With Quote
 
 
 
 
Mantorok
Guest
Posts: n/a
 
      07-07-2005
No, it's a v2.0 control.

Kev

"Eliyahu Goldin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What is a BulletList control? Is it your custom control?
>
> Eliyahu
>
> "Mantorok" <(E-Mail Removed)> wrote in message
> news:dajeh1$8vd$(E-Mail Removed)...
>>
>> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>> > Kev,
>> >
>> > You need to attach client-side events to the control. You need to
>> > understand
>> > what HTML elements the control renders as and how to get to the
>> > elements
>> > from server code.

>>
>> Do you have any examples or guidance for me on achieving that?
>>
>> Thanks
>> Kev
>>
>> >
>> > "Mantorok" <(E-Mail Removed)> wrote in message
>> > news:dajdtd$8kq$(E-Mail Removed)...
>> >> Hi all
>> >>
>> >> Is it possible to have client-side scripts executed from server

> controls,
>> > I
>> >> have a BulletList control and when they click on an item in the list I
>> > need
>> >> some javascript to be executed.
>> >>
>> >> Thanks
>> >> Kev
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      07-07-2005
re:
> it's a v2.0 control.


Is it ? I can't find it in my 2.0 documentation,
nor on the online msdn2 docs. Would you post an online reference ?

I know it's a Display mode for the <asp:ValidationSummary control :
DisplayMode="BulletList | List ( but that works in v 1.1, too )
or, more properly, it's one of the Members of the DisplayMode
Enumeration ( the others are "List" and "SingleParagraph ).

I thought it could be a control which Dino Esposito authored :
http://www.code-magazine.com/article...0309051&page=2




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Mantorok" <(E-Mail Removed)> wrote in message news:dajfha$9j4$(E-Mail Removed)...
> No, it's a v2.0 control.
>
> Kev
>
> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> What is a BulletList control? Is it your custom control?
>>
>> Eliyahu
>>
>> "Mantorok" <(E-Mail Removed)> wrote in message
>> news:dajeh1$8vd$(E-Mail Removed)...
>>>
>>> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>> > Kev,
>>> >
>>> > You need to attach client-side events to the control. You need to
>>> > understand
>>> > what HTML elements the control renders as and how to get to the elements
>>> > from server code.
>>>
>>> Do you have any examples or guidance for me on achieving that?
>>>
>>> Thanks
>>> Kev
>>>
>>> >
>>> > "Mantorok" <(E-Mail Removed)> wrote in message
>>> > news:dajdtd$8kq$(E-Mail Removed)...
>>> >> Hi all
>>> >>
>>> >> Is it possible to have client-side scripts executed from server

>> controls,
>>> > I
>>> >> have a BulletList control and when they click on an item in the list I
>>> > need
>>> >> some javascript to be executed.
>>> >>
>>> >> Thanks
>>> >> Kev
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Mantorok
Guest
Posts: n/a
 
      07-07-2005
Aha, thank you, i'll give that a go.

Kev

"Eliyahu Goldin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Look at Attributes property. You need to know what client event you want
> to
> handle and set the attribute for this event to the name of a javascript
> function that will handle it.:
>
> myList.Attributes["<client event>"]="handleTheEvent();";
>
> Again, you need to find out what html tag the BulletedList is rendered as
> and what event you need to handle for this tag.
>
> Eliyahu
>
> "Mantorok" <(E-Mail Removed)> wrote in message
> news:dajfha$9j4$(E-Mail Removed)...
>> No, it's a v2.0 control.
>>
>> Kev
>>
>> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > What is a BulletList control? Is it your custom control?
>> >
>> > Eliyahu
>> >
>> > "Mantorok" <(E-Mail Removed)> wrote in message
>> > news:dajeh1$8vd$(E-Mail Removed)...
>> >>
>> >> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
>> >> news:%(E-Mail Removed)...
>> >> > Kev,
>> >> >
>> >> > You need to attach client-side events to the control. You need to
>> >> > understand
>> >> > what HTML elements the control renders as and how to get to the
>> >> > elements
>> >> > from server code.
>> >>
>> >> Do you have any examples or guidance for me on achieving that?
>> >>
>> >> Thanks
>> >> Kev
>> >>
>> >> >
>> >> > "Mantorok" <(E-Mail Removed)> wrote in message
>> >> > news:dajdtd$8kq$(E-Mail Removed)...
>> >> >> Hi all
>> >> >>
>> >> >> Is it possible to have client-side scripts executed from server
>> > controls,
>> >> > I
>> >> >> have a BulletList control and when they click on an item in the
>> >> >> list

> I
>> >> > need
>> >> >> some javascript to be executed.
>> >> >>
>> >> >> Thanks
>> >> >> Kev
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Mantorok
Guest
Posts: n/a
 
      07-07-2005

"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> re:
>> it's a v2.0 control.

>
> Is it ? I can't find it in my 2.0 documentation,
> nor on the online msdn2 docs. Would you post an online reference ?
>
> I know it's a Display mode for the <asp:ValidationSummary control :
> DisplayMode="BulletList | List ( but that works in v 1.1, too )
> or, more properly, it's one of the Members of the DisplayMode
> Enumeration ( the others are "List" and "SingleParagraph ).
>
> I thought it could be a control which Dino Esposito authored :
> http://www.code-magazine.com/article...0309051&page=2


Oops, I meant BulletedList....

Kev

>
>
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espaņol
> Ven, y hablemos de ASP.NET...
> ======================
>
> "Mantorok" <(E-Mail Removed)> wrote in message
> news:dajfha$9j4$(E-Mail Removed)...
>> No, it's a v2.0 control.
>>
>> Kev
>>
>> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> What is a BulletList control? Is it your custom control?
>>>
>>> Eliyahu
>>>
>>> "Mantorok" <(E-Mail Removed)> wrote in message
>>> news:dajeh1$8vd$(E-Mail Removed)...
>>>>
>>>> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
>>>> news:%(E-Mail Removed)...
>>>> > Kev,
>>>> >
>>>> > You need to attach client-side events to the control. You need to
>>>> > understand
>>>> > what HTML elements the control renders as and how to get to the
>>>> > elements
>>>> > from server code.
>>>>
>>>> Do you have any examples or guidance for me on achieving that?
>>>>
>>>> Thanks
>>>> Kev
>>>>
>>>> >
>>>> > "Mantorok" <(E-Mail Removed)> wrote in message
>>>> > news:dajdtd$8kq$(E-Mail Removed)...
>>>> >> Hi all
>>>> >>
>>>> >> Is it possible to have client-side scripts executed from server
>>> controls,
>>>> > I
>>>> >> have a BulletList control and when they click on an item in the list
>>>> >> I
>>>> > need
>>>> >> some javascript to be executed.
>>>> >>
>>>> >> Thanks
>>>> >> Kev
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-07-2005
Kev,

You need to attach client-side events to the control. You need to understand
what HTML elements the control renders as and how to get to the elements
from server code.

Eliyahu

"Mantorok" <(E-Mail Removed)> wrote in message
news:dajdtd$8kq$(E-Mail Removed)...
> Hi all
>
> Is it possible to have client-side scripts executed from server controls,

I
> have a BulletList control and when they click on an item in the list I

need
> some javascript to be executed.
>
> Thanks
> Kev
>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      07-07-2005
Ahh, the mystery unravels!
I was scratching my head on that one...



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Mantorok" <(E-Mail Removed)> wrote in message news:dajh95$ac6$(E-Mail Removed)...
>
> "Juan T. Llibre" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> re:
>>> it's a v2.0 control.

>>
>> Is it ? I can't find it in my 2.0 documentation,
>> nor on the online msdn2 docs. Would you post an online reference ?
>>
>> I know it's a Display mode for the <asp:ValidationSummary control :
>> DisplayMode="BulletList | List ( but that works in v 1.1, too )
>> or, more properly, it's one of the Members of the DisplayMode
>> Enumeration ( the others are "List" and "SingleParagraph ).
>>
>> I thought it could be a control which Dino Esposito authored :
>> http://www.code-magazine.com/article...0309051&page=2

>
> Oops, I meant BulletedList....
>
> Kev




 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-07-2005
What is a BulletList control? Is it your custom control?

Eliyahu

"Mantorok" <(E-Mail Removed)> wrote in message
news:dajeh1$8vd$(E-Mail Removed)...
>
> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Kev,
> >
> > You need to attach client-side events to the control. You need to
> > understand
> > what HTML elements the control renders as and how to get to the elements
> > from server code.

>
> Do you have any examples or guidance for me on achieving that?
>
> Thanks
> Kev
>
> >
> > "Mantorok" <(E-Mail Removed)> wrote in message
> > news:dajdtd$8kq$(E-Mail Removed)...
> >> Hi all
> >>
> >> Is it possible to have client-side scripts executed from server

controls,
> > I
> >> have a BulletList control and when they click on an item in the list I

> > need
> >> some javascript to be executed.
> >>
> >> Thanks
> >> Kev
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-07-2005
Look at Attributes property. You need to know what client event you want to
handle and set the attribute for this event to the name of a javascript
function that will handle it.:

myList.Attributes["<client event>"]="handleTheEvent();";

Again, you need to find out what html tag the BulletedList is rendered as
and what event you need to handle for this tag.

Eliyahu

"Mantorok" <(E-Mail Removed)> wrote in message
news:dajfha$9j4$(E-Mail Removed)...
> No, it's a v2.0 control.
>
> Kev
>
> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > What is a BulletList control? Is it your custom control?
> >
> > Eliyahu
> >
> > "Mantorok" <(E-Mail Removed)> wrote in message
> > news:dajeh1$8vd$(E-Mail Removed)...
> >>
> >> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
> >> news:%(E-Mail Removed)...
> >> > Kev,
> >> >
> >> > You need to attach client-side events to the control. You need to
> >> > understand
> >> > what HTML elements the control renders as and how to get to the
> >> > elements
> >> > from server code.
> >>
> >> Do you have any examples or guidance for me on achieving that?
> >>
> >> Thanks
> >> Kev
> >>
> >> >
> >> > "Mantorok" <(E-Mail Removed)> wrote in message
> >> > news:dajdtd$8kq$(E-Mail Removed)...
> >> >> Hi all
> >> >>
> >> >> Is it possible to have client-side scripts executed from server

> > controls,
> >> > I
> >> >> have a BulletList control and when they click on an item in the list

I
> >> > need
> >> >> some javascript to be executed.
> >> >>
> >> >> Thanks
> >> >> Kev
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>

> >
> >

>
>



 
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
Using a Scripting Language as Your Scripting Language DaveInSidney Python 0 05-09-2005 03:13 AM
How to mark ActiveX control (VB6.0) as save for scripting Chris Zoper ASP .Net 1 09-10-2004 03:14 PM
Python is the best and most popular general purpose scripting language; the universal scripting language Ron Stephens Python 23 04-12-2004 05:32 PM
ASP:HyperLink control and client-side scripting Brian W ASP .Net 4 03-04-2004 05:24 PM
HTML Client Control versus. HTML Server Control versus. Web Server Control Matthew Louden ASP .Net 1 10-11-2003 07:09 PM



Advertisments