hello ive been trying to insert a java code to change the images of my buttons when the mouse is held over i have followed these codes

<script type="text/javascript">
function mouseOver()
document.b1.src ="t5fshop.png"
function mouseOut()
document.b1.src ="t5fshop2.png"
<td width="191"><a href="http://www.bob.com" 
<img border="0" img src="t5fshop.png" name="b1" width="190" height="50" /></a></td>

in dreamweaver when i click to see what it looks like in a ie6 browser nothing happens to the button when i hold it over? im wondering wether this is because i havent sent the images to a server yet? thanks for your help in advance

12 Years
Discussion Span
Last Post by FC Jamison

Please use the "shift" and apostrophe keys on your keyboard, where appropriate. We don't like "sloppy" posts here.

What doctype are you using in your pages? The proper way to reference HTML elements is to give each element a unique "id".

Then, to return a reference to the element (so you can change the "src", for example) you use document.getElementById('myID') .

So start by giving your href element an ID, and changing your script to use the "getElementById" method.

Votes + Comments
dont like people talking down to me

You add the id just like have the "name" attribute now. Your image tag is also messed up. It's got an extra "img" inside of it.

In English, the pronoun to refer oneself is "I", not "i".


haha in communication as long as somone gets the message it doesnt matter what language you use. thanks for the tips


I strongly disagree, and in fact so does Daniweb's official rules. Communication is about conveying "the message" as clearly as possible. Here, that means writing your posts in conventional, standard English.

Glad I could help.

Votes + Comments
what is capitalization? LOL


In spirit, I tend to agree with you...however, each setting has its own set of policies and procedures.

As this forum is intended as a professional outlet, proper use of pronouns and sentence structure are not just appreciated...they are expected.

As a student, you would be wise to learn that in the real world the ability to present yourself in a professional manner is just as important as the ability to communicate your thoughts.

Please follow the proper etiquette when making further posts to our forum.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.