Help manipulating MousePointers over server controls

G

Guest

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
 
G

Guest

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 said:
lbx.Attributes("onmouseover") = "this.className='xlink'"

Eliyahu
 
G

Guest

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
 
E

Eliyahu Goldin

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 said:
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
 
E

Eliyahu Goldin

See inline

Eliyahu

Neal said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top