PDA

View Full Version : Manual Scroller onMousever not on click



bellbell
05-27-2008, 08:09 PM
1) Script Title: Manual Scroller

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/manualscroll.htm

3) Describe problem: Installed script and works fine, but want to have layer scroll when you mouseover the Down or Up text instead of clicking on the text. Additionally, it should stop scrolling on mouseOut.

Please advise. Greatly appreicated.

rangana
05-28-2008, 02:43 AM
Then create an onmouseover attribute instead of the onclick:


<a href="#" onmouseover="movedown()">Down</a> <a href="#" onmouseover="moveup()">Up</a>
<a href="#" onmouseover="stopscroll()">Stop</a> <a href="#" onmouseover="movetop()">Top</a>

Nile
05-28-2008, 02:53 AM
Or you can even do this:


<a href="javascript:void(0);" onmouseover="movedown()" onmouseout="stopscroll()">Down</a><
a href="javascript:void(0);" onmouseover="moveup()">Up</a>
<a href="javascript:void(0);" onmouseover="movetop()">Top</a>

Also be sure to include void(0).

rangana
05-28-2008, 02:55 AM
Or you can even do this:
Also be sure to include void(0).

Why?..what if I'll have a link to fire as normal ones.:rolleyes:

bellbell
05-28-2008, 03:00 AM
Thank you!!! These are great. :D Worked perfectly.

Nile
05-28-2008, 03:00 AM
Why?..what if I'll have a link to fire as normal ones.:rolleyes:
Can you rephrase that? I didn't quite get "fire" and the "normal ones". :confused:

Thank you!!! These are great. :D Worked perfectly.
Who are you talking to?

bellbell
05-28-2008, 03:03 AM
What's the purpose of the void(0). I just did it this way:
<a href="#" onmouseover="movedown()" onmouseout="stopscroll()">, etc...

Nile
05-28-2008, 03:11 AM
Thats fine, void(0) doesn't do anything, so if that thing was at the bottom of the page, and you had # as the href it'd take you to the top, but it you have javascript:void(0), it wouldn't do anything. So did you use my script or rangana's script?

bellbell
05-28-2008, 03:18 AM
Yours minus the void element....where the two functions are combined.
Thx.

Nile
05-28-2008, 03:23 AM
Anytime. I'm just suggesting using it but then again, Its your choice. :D

jamesdavid
06-10-2008, 03:03 PM
Ive added this just below the body tag;

<a href="javascript:void(0);" onmouseover="movedown()" onmouseout="stopscroll()">Down</a>
<a href="javascript:void(0);" onmouseover="moveup()" onmouseout"stopscroll()">Up</a>

The new 'down' works fine but the new 'up' continues to scroll when you move your mouse off it.

jamesdavid
06-10-2008, 03:13 PM
Oops, missed out an '=' sign, seems to be working fine now.

<a href="javascript:void(0);" onmouseover="movedown()" onmouseout="stopscroll()">Down</a>
<a href="javascript:void(0);" onmouseover="moveup()" onmouseout="stopscroll()">Up</a>

Are their likely to be any accessibility or usability issues with this?