/    Sign up×
Community /Pin to ProfileBookmark

Combining Functions on a Page

Hi,

I’m designing a webpage that sells Halloween products. I’m using a couple of javascript functions to add some interactivity to the page, but I’ve run into a problem. Now, I’d like to have two things happen when the user mouses over that little window over the door:

  • 1.

    the window opens to reveal an icon, like this:
    [url]http://catherineharrell.com/holidaysites/halloween/imageswap.html[/url]

  • 2.

    and at the same time, a name appears below the haunted house, like this:
    [url]http://catherineharrell.com/holidaysites/halloween/hilite.html[/url]

  • These two functions work independently…but put them together, and only one will work.

    The two pages I showed you are identical, except that on that first page, the body onload function looks like this:
    body onload=”initMaps(‘menubarMap’);hiLite(imgName,imgObjName)”>, so only the initMaps function works (the bag icon appears).

    And on the second page, the order is reversed:
    <body onload=”hiLite(imgName,imgObjName);initMaps(‘menubarMap’)”> so only the hiLite function works (the name appears).

    I’m kind of a beginner with this sort of thing, so I suspect there’s a conflict in the code but I don’t know exactly how to go about solving it. Any help would be appreciated. Thanks for checking it out.

    -Catherine

    to post a comment
    JavaScript

    2 Comments(s)

    Copy linkTweet thisAlerts:
    @A1ien51Jan 03.2006 — You get 404 errors with the links.

    Eric
    Copy linkTweet thisAlerts:
    @charrellauthorJan 03.2006 — Uh oh. Fixed the links...that should take care of the 404. Apologies.
    ×

    Success!

    Help @charrell spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...