codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:



Home » DHTML » Article

Simple Mouse Trail using VB Script

Article by:  Jeff Anderson  ( 1362 ) (2/10/2003)
Bookmark us now! Add to Favourites
Email a friend!Tell a friend
Summary: With IE gaining in prominence every day, it's becoming acceptable to use VBScript in web pages. That makes some activities like the mouse trail a real cinch.
Viewed: 43051 times Rating (30 votes): 
 4.2 out of 5
 Rate this Article  Read Comments  Post Comments

Simple Mouse Trail using VB Script



Whatever you want, even images: Following the cursor is really very easy in VB script. Simply set up a span tag with an id of, say 'my_stuff' then use the built in IE subroutine document_onMouseMove to set the absolute position of the span. You can adjust the amount to get it just where you want in relation to the cursor. What could be easier?

As an adjunct to this, if you move the cursor around on this page you will see that the trailing text attempts to adjust itself to fit - try pushing it up against the right margin for example.

One final word of warning, if your page scrolls down (as this one does) you will lose the mouse trail. To keep it we would need to take account of the document.body.scrollTop position - but that's for another time.

For now, enjoy the simplicity of this little script.

Select All Code







CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
Rate this article:     Poor Excellent
View highlighted Comments
User Comments on 'Simple Mouse Trail using VB Script'
Posted by :  Archive Import (Laurence) at 14:39 on Sunday, February 23, 2003
Great. I have been looking for a simple code for hours now. I found some fancy stuff with incredible trailers ... but there was no way to get a very simple code for a dynamic effect to combine with an onmouse event of my making. Thank you.
Posted by :  Archive Import (Anifalaje Adetunji) at 05:35 on Monday, February 24, 2003
this is what i have been looking for. it is very nice.
please can you please help me to do a mouse trail effect for my webpage?

please just use it and mail me but using my email address and let the trail effect be

" WELCOME TO ANIFALAJE ADETUNJI"S WEBSITE"

thanks
Posted by :  Archive Import (faiz) at 15:07 on Friday, February 28, 2003
nice
Posted by :  Archive Import (Herb Aurand) at 09:57 on Friday, May 09, 2003
This is very good but I do have one question. How do I put this into my web site and only have it on the "home" page. Also can I ad text to it. Please help.
Posted by :  Archive Import (venu) at 03:22 on Thursday, May 29, 2003
i india oyu
Posted by :  Archive Import (dipak patel ) at 06:37 on Tuesday, June 17, 2003
hey its that i want
Posted by :  Archive Import (kumag ka) at 09:25 on Friday, July 11, 2003
walang its so putang ina...
Posted by :  Archive Import (can't say) at 03:22 on Wednesday, September 10, 2003
Well.. You know I wanted o know wether you ever got ones that changed the mouse to a picture of say.. a cat and it stayed like that..??? anyway... just wondering.. thanks


To post comments you need to become a member. If you are already a member, please log in .

 



RELATED ARTICLES
Simple Thumbnail Browsing Solution
by Troy Wolf
This simple script allows the user to select from several thumbnail images and view the larger image, using a mixture of DHTML and Cascading style sheets.
Creating CSS Buttons
by Thomas D. Greer
With Cascading Style Sheets, you can turn ordinary hyperlinks into fully functional "buttons", without using JavaScript.
DHTML Javascript Ticker
by Premshree Pillai
This is a JavaScript Ticker which ticks a number of messages like the one shown above. It also has a useful 'Show All' feature.
DHTML Horizontal Scroller
by Premshree Pillai
Scroll text horizontally when the user hovers over a link.
Manipulate Scrollbar Colors Using CSS and JavaScript
by Mike Thompson
The thing about the default color of scrollbars is that it's dull and ugly -- usually this color is gray. Wouldn't it be nice to change this color to better fit the overall theme of your site? Luckily, Cascading Style Sheets and JavaScript can be used to do just that!
DHTML News Bar
by Premshree Pillai
This is the News Bar script which displays a number of messages and rotates them using DHTML.
DHTML Scrolling Image
by Premshree Pillai
Using this script the user can scroll an image left or right by clicking a buttong
DHTML Zoom In and Out Script
by Premshree Pillai
Using zoOom, you can zoom in and zoom out any image that is specified in the code.
DHTML Image Zoom Out
by Premshree Pillai
Click on the image and it zooms out and disappears. This script could be a way to handle advertising or other images.
Simple Mouse Trail using VB Script
by Jeff Anderson
With IE gaining in prominence every day, it's becoming acceptable to use VBScript in web pages. That makes some activities like the mouse trail a real cinch.








Recent Forum Threads
• Significant Factors
• Perl array access
• Re: huffman encoding and decoding in C++...
• Perl One Liner: Replace {(
• Re: html including php, accessing the functions
• Something like an INI editor or a DelimitedText-Editor
• Error Deleting File or Folder
• Re: How can use ASP.NET RegularExpressionValidator for alphanumeric 10 digit input
• Re: drop-down menu selected value


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009