Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6

Thread: rollover error

  1. #1
    Banned
    Join Date
    Oct 2003
    Posts
    236
    Member #
    3555
    thi

  2.  

  3. #2
    Senior Member nocloset's Avatar
    Join Date
    Sep 2003
    Posts
    108
    Member #
    3228
    You're not calling fRollover, you're calling fRoll. But I think that might just be a typo here.

    I think the problem is in the second line of your fRollover function. Instead of

    document[sImage].src

    shouldn't you have

    document.images[sImage].src

    ?

  4. #3
    Banned
    Join Date
    Oct 2003
    Posts
    236
    Member #
    3555
    didnt work

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Turn this:
    Code:
    document[sImage].src = eval(sImage + "_" + sState + ".src");
    into this:
    Code:
    document.images[sImage].src = sImage + "_" + sState + ".src";
    Get rid of the eval() on the same line... the src parameter takes a string... eval attempts to execute a string... that line will generate an error.

  6. #5
    Banned
    Join Date
    Oct 2003
    Posts
    236
    Member #
    3555
    still didnt work

  7. #6
    Senior Member nocloset's Avatar
    Join Date
    Sep 2003
    Posts
    108
    Member #
    3228
    If I understand Javascript errors enough, "object expected" means that you are trying to perform some action on something that is not an object but that should only be performed on an object.

    Is it possible that this is happening in the line

    for (i=0;i != aMenus.length;i++)

    because aMenus is not yet instantiated?

    I'm not sure because you don't show your page where you run the script. Try moving the instantiation of aMenus into your script and see if that works.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:55 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com