Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JavaScript Mouseover

Status
Not open for further replies.

HJM1234

Programmer
Jan 5, 2003
33
US
Hi

I would like to write a small JavaScript application that will switch Yes and No buttons. I want to add it to a class project. Basically, it would be a popup that says would you like to buy the book. If the persons goes to the No button, onMouseOver , the no become a Yes and the Yes becomes a No. I can get one button to change but not both at the same time. Can anyone help.

Thank you.

Harvey
 
A simple course in how to p**s off a site visitor, good job you said it was for a class project.

you will need to have two lines swapping images. something like

Code:
function swap (object_1_ID, image1, object_2_ID, image2)
{
document[object_1_ID].src = image1;
document[object_2_ID].src = image2;
}

then use the 4 parameters in the onMouseOver and onMouseOut calls to swap()


Chris.

Indifference will be the downfall of mankind, but who cares?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top