By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,635 Members | 1,781 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,635 IT Pros & Developers. It's quick & easy.

Help manipulating MousePointers over server controls

P: n/a
Hi

I need to change my mousepointer when the mouse moves over certain populated
controls on my aspx page.

I've tried the following but without success (after visiting a site
recommended from this forum, ie css cursors tutorial)

I have, in the HTML defined this
<Head>
<style type="text/css">
..xlink { CURSOR: crosshair }
</style>
....
...
</HEAD>
and in the aspx.vb page
(where lbx is a listbox class variable (for a findcontrol in a grid))

lbx.Attributes("onmouseover") = "this.style.class=""xlink"" "

which renders a syntax error (I have tried single quotes etc)

Note: changing colours in the control with the following works
'lbx.Attributes("onmouseover") = "this.style.color='red'"

any ideas / help
TIA
--
Neal Rogers
University of Cape Town
Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
lbx.Attributes("onmouseover") = "this.className='xlink'"

Eliyahu

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:6E**********************************@microsof t.com...
Hi

I need to change my mousepointer when the mouse moves over certain populated controls on my aspx page.

I've tried the following but without success (after visiting a site
recommended from this forum, ie css cursors tutorial)

I have, in the HTML defined this
<Head>
<style type="text/css">
.xlink { CURSOR: crosshair }
</style>
...
..
</HEAD>
and in the aspx.vb page
(where lbx is a listbox class variable (for a findcontrol in a grid))

lbx.Attributes("onmouseover") = "this.style.class=""xlink"" "
which renders a syntax error (I have tried single quotes etc)

Note: changing colours in the control with the following works
'lbx.Attributes("onmouseover") = "this.style.color='red'"

any ideas / help
TIA
--
Neal Rogers
University of Cape Town

Nov 19 '05 #2

P: n/a
Thanks,
That takes care of the syntax error,
but the mousepointer does not change on mouseover the lbox as anticipated.

I tried these ,.. all to no avail
1.. 'lbx.Attributes("onmouseover") = "this.className='xlink'"

2.. 'lbx.Attributes.Add("onmouseover", "clientfunction();")
'lbx.Attributes("onmouseover") = "this.className='xlink'"

3..' lbx.Attributes.Add("onmouseover",
"this.classname='xlink'")

All escape the syntax check, but none work.

anything I am missing here ?
Neal
"Eliyahu Goldin" wrote:
lbx.Attributes("onmouseover") = "this.className='xlink'"

Eliyahu

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:6E**********************************@microsof t.com...
Hi

I need to change my mousepointer when the mouse moves over certain

populated
controls on my aspx page.

I've tried the following but without success (after visiting a site
recommended from this forum, ie css cursors tutorial)

I have, in the HTML defined this
<Head>
<style type="text/css">
.xlink { CURSOR: crosshair }
</style>
...
..
</HEAD>
and in the aspx.vb page
(where lbx is a listbox class variable (for a findcontrol in a grid))

lbx.Attributes("onmouseover") =

"this.style.class=""xlink"" "

which renders a syntax error (I have tried single quotes etc)

Note: changing colours in the control with the following works
'lbx.Attributes("onmouseover") = "this.style.color='red'"

any ideas / help
TIA
--
Neal Rogers
University of Cape Town


Nov 19 '05 #3

P: n/a
Try it on unpopulated listbox or on a control that doesn't contain any other
controls. It should work. Could be you have different setting for the inner
controls interfering with the one for the listbox.

Eliyahu

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:01**********************************@microsof t.com...
Thanks,
That takes care of the syntax error,
but the mousepointer does not change on mouseover the lbox as anticipated.

I tried these ,.. all to no avail
1.. 'lbx.Attributes("onmouseover") = "this.className='xlink'"
2.. 'lbx.Attributes.Add("onmouseover", "clientfunction();")
'lbx.Attributes("onmouseover") = "this.className='xlink'"
3..' lbx.Attributes.Add("onmouseover",
"this.classname='xlink'")

All escape the syntax check, but none work.

anything I am missing here ?
Neal
"Eliyahu Goldin" wrote:
lbx.Attributes("onmouseover") = "this.className='xlink'"

Eliyahu

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:6E**********************************@microsof t.com...
Hi

I need to change my mousepointer when the mouse moves over certain

populated
controls on my aspx page.

I've tried the following but without success (after visiting a site
recommended from this forum, ie css cursors tutorial)

I have, in the HTML defined this
<Head>
<style type="text/css">
.xlink { CURSOR: crosshair }
</style>
...
..
</HEAD>
and in the aspx.vb page
(where lbx is a listbox class variable (for a findcontrol in a grid))

lbx.Attributes("onmouseover") =

"this.style.class=""xlink"" "

which renders a syntax error (I have tried single quotes etc)

Note: changing colours in the control with the following works
'lbx.Attributes("onmouseover") = "this.style.color='red'"
any ideas / help
TIA
--
Neal Rogers
University of Cape Town


Nov 19 '05 #4

P: n/a
I hear you, but

I need it on populated listboxes in the dgrids cells,(actually I need the
cursor to be "hand") to indicate to users that there is more data (like a
hyperlink cursor), which when they click it, displays a modal dialog with
more indepth "drilldown" data.

It may be that the listbox being the inner control is not seeing the style
class added in the HTML (in the Head section)... in fact that is probably the
case.

I have creatd scripts dynamically for each listbox only when they are
populated, identifying them and their data and these respond correctly to a
click event and show the modal dialog with each's respective data,
should i maybe perpetuate this methodology instead,.. maybe add some jscript
to handle the cursor type ?? or try moving the style class out somewhere
else??

Neal

"Eliyahu Goldin" wrote:
Try it on unpopulated listbox or on a control that doesn't contain any other
controls. It should work. Could be you have different setting for the inner
controls interfering with the one for the listbox.

Eliyahu

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:01**********************************@microsof t.com...
Thanks,
That takes care of the syntax error,
but the mousepointer does not change on mouseover the lbox as anticipated.

I tried these ,.. all to no avail
1.. 'lbx.Attributes("onmouseover") =

"this.className='xlink'"

2.. 'lbx.Attributes.Add("onmouseover", "clientfunction();")
'lbx.Attributes("onmouseover") =

"this.className='xlink'"

3..' lbx.Attributes.Add("onmouseover",
"this.classname='xlink'")

All escape the syntax check, but none work.

anything I am missing here ?
Neal
"Eliyahu Goldin" wrote:
lbx.Attributes("onmouseover") = "this.className='xlink'"

Eliyahu

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:6E**********************************@microsof t.com...
> Hi
>
> I need to change my mousepointer when the mouse moves over certain
populated
> controls on my aspx page.
>
> I've tried the following but without success (after visiting a site
> recommended from this forum, ie css cursors tutorial)
>
> I have, in the HTML defined this
> <Head>
> <style type="text/css">
> .xlink { CURSOR: crosshair }
> </style>
> ...
> ..
> </HEAD>
>
>
> and in the aspx.vb page
> (where lbx is a listbox class variable (for a findcontrol in a grid))
>
> lbx.Attributes("onmouseover") =
"this.style.class=""xlink"" "
>
> which renders a syntax error (I have tried single quotes etc)
>
> Note: changing colours in the control with the following works
> 'lbx.Attributes("onmouseover") = "this.style.color='red'" >
> any ideas / help
> TIA
>
>
> --
> Neal Rogers
> University of Cape Town


Nov 19 '05 #5

P: n/a
See inline

Eliyahu

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:6A**********************************@microsof t.com...
I hear you, but

I need it on populated listboxes in the dgrids cells,(actually I need the
cursor to be "hand") to indicate to users that there is more data (like a
hyperlink cursor), which when they click it, displays a modal dialog with
more indepth "drilldown" data. You can set "onmouseover" for the cells rather than for the listboxes.

It may be that the listbox being the inner control is not seeing the style
class added in the HTML (in the Head section)... in fact that is probably the case. No, this is not the case. There is no difference between inner and outer
controls in this respect.

I have creatd scripts dynamically for each listbox only when they are
populated, identifying them and their data and these respond correctly to a click event and show the modal dialog with each's respective data,
should i maybe perpetuate this methodology instead,.. maybe add some jscript to handle the cursor type ??

You can try. BTW you don't have to use css. this.style.cursor='hand' should
also do.

or try moving the style class out somewhere

else??

Neal

"Eliyahu Goldin" wrote:
Try it on unpopulated listbox or on a control that doesn't contain any other controls. It should work. Could be you have different setting for the inner controls interfering with the one for the listbox.

Eliyahu

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:01**********************************@microsof t.com...
Thanks,
That takes care of the syntax error,
but the mousepointer does not change on mouseover the lbox as anticipated.
I tried these ,.. all to no avail
1.. 'lbx.Attributes("onmouseover") =

"this.className='xlink'"

2.. 'lbx.Attributes.Add("onmouseover", "clientfunction();") 'lbx.Attributes("onmouseover") =

"this.className='xlink'"

3..' lbx.Attributes.Add("onmouseover",
"this.classname='xlink'")

All escape the syntax check, but none work.

anything I am missing here ?
Neal
"Eliyahu Goldin" wrote:

> lbx.Attributes("onmouseover") = "this.className='xlink'"
>
> Eliyahu
>
> "Neal" <Ne**@discussions.microsoft.com> wrote in message
> news:6E**********************************@microsof t.com...
> > Hi
> >
> > I need to change my mousepointer when the mouse moves over certain
> populated
> > controls on my aspx page.
> >
> > I've tried the following but without success (after visiting a site > > recommended from this forum, ie css cursors tutorial)
> >
> > I have, in the HTML defined this
> > <Head>
> > <style type="text/css">
> > .xlink { CURSOR: crosshair }
> > </style>
> > ...
> > ..
> > </HEAD>
> >
> >
> > and in the aspx.vb page
> > (where lbx is a listbox class variable (for a findcontrol in a grid)) > >
> > lbx.Attributes("onmouseover") =
> "this.style.class=""xlink"" "
> >
> > which renders a syntax error (I have tried single quotes etc)
> >
> > Note: changing colours in the control with the following works
> > 'lbx.Attributes("onmouseover") =

"this.style.color='red'"
> >
> > any ideas / help
> > TIA
> >
> >
> > --
> > Neal Rogers
> > University of Cape Town
>
>
>


Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.