Results 1 to 4 of 4

Thread: Mouse cursor and trailing

  1. #1
    Join Date
    Jun 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Mouse cursor and trailing

    Is there a way to make the custom cursor script and the image trailing script or any other script of the sort work simultaneously? it seems that i can only make just one of them at a time. If i try to include both scripts in my code the cursor would change, however, the image would not follow it.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Below are the stock answers to this type of question. I might add that we strongly suggest you also provide a link to the scripts in question and a link to the page you are having trouble with. In general, it probably is possible, as custom cursor can be applied directly through style (no script required) the image trailing scripts just create elements that follow the cursors coordinates according to various algorithms and whatnot. Custom cursor is an IE5+ only effect though.

    Note: Questions regarding multiple script usage are not usually replied to due to their time consuming nature. See this thread for more information, and this tutorial for one possible solution.

    Aside from the tutorial above which usually is the solution when the problem is two different scripts, you may need to consult:

    http://www.howtocreate.co.uk/tutoria...allshow#refcon

    Which explains how two scripts on the same page may not use the same set of variable names, id names, etc. This is especially important if the problem is two copies of the same script on a page.

    One other approach that works in both situations is to put one script in a borderless iframe. It will look like it is on the same page but, since it really is on a separate page, conflicts are no longer an issue.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking Thanks!

    Turns out its either i posted the script for the trailing images wrong or there was some fault in the code which i highly doubt. in any case what i did was use another script and for the custom cursor i put it under the body tag instead of the head tag which worked fine for me!

  4. #4
    Join Date
    Jul 2005
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Guys

    I am a new member of the dynamic drive forums and I need some help.

    The reason for this message is in response to the above post titled 'Mouse cursor and trailing':

    I noticed John was very helpful in his response and I was wondering if anyone would be so kind as to help my with a similar dillema that I am having with JavaScript...

    Basically I have created a website and I have employed a menu system using javascript (along with other javascripts in the same page.) These all work fine but when I attempt to incorporate a mouse trailer javascript code, it simply does not work as there seems to be a conflict with the other javascript scripts in the webpage, whereas the other scrips work fine.

    I tried the above links and the tutorial provided by jscheuer1 in this post but they do not apply to me as I am not using an onLoad script within the body tag of my webpage. (except onLoad=set() to display the date)

    My question is in regard to the following quote:

    QUOTE

    One other approach that works in both situations is to put one script in a borderless iframe. It will look like it is on the same page but, since it really is on a separate page, conflicts are no longer an issue.

    UNQUOTE

    My question therefore is:

    How can I get the javascript coding in the IFRAME of my webpage to work / execute on all other pages? As the javascript seems to be executed in the IFRAME only and not the main page where I want it to work. Bascially the mouse trailer now works in the IFRAME and not the main page of the website so I want to 'pull' in the javascript from this IFRAME into the main pages of the website so that there will no longer be a conflict of scripts as the IFRAME is on a separate page technically.

    I thought you guys would be the best to ask this question, as you all seem to know your stuff.

    Any answer to this question or help on solving this would greatly be appreciated.

    Kind Regards

    DJM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •