Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6330257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:50:18+00:00 2026-05-24T17:50:18+00:00

We are making a advert div, and we have this function on mouse over

  • 0

We are making a advert div, and we have this function on mouse over and mouse out an effect takes place. The issue is I cannot run more than one of these functions on same page, I suppose because it does not possess an ID.

Code is

Function mouseOver ()
{
    document.getelementbyid("flashdiv").classname="flash-abg";
}
Function mouseOut ()
{
    document.getelementbyid("flashdiv").classname="flash-I";
}

So how would I. Run two of these on one page, I am on iPad so difficult to set styling on here, etc. So apologies.

Basically the above code accompanies HTML and CSS to display hover effect on a advert div, we have all divs working correctly individually but because we have no I’d for the functions, they don’t work together correctly when we have more than one on a page. As you can see I am crap at js.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:50:18+00:00Added an answer on May 24, 2026 at 5:50 pm

    If you want the same function to be binded to different elements, if correclty binded this is a reference to the source of the event (the div to which the event is attached). That should allow you to bind the same function to different elements. In your code just replace document.getelementbyid(“flashdiv”) for this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Making .htaccess (mod_rewrite) work has been very difficult I already have this script for
Making this tutorial: http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html I have ListActivity-derived class and onCreateContextMenu, onContextItemSelected overrides. I think
Making my first steps with NHibernate, I'm trying to have it creating my Tables
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
Making a mobile friendly site, I have a single field and a submit button.
Making sense out of an .MSI verbose trace. I created the .MSI using VisualStudio
making an infinite loop in javascript, and jQuery... this is my current code: $(#bg2).css({opacity:
Making my PHP Command line application support Linux and Windows. Currently it has this
Making my way through the GAE documents. I have a question I can't find
Making game of life I need to a have a grid that is 30x20

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.