Hi I’ve exhausted myself trying to figure out how to use the onmouserollover effect in the place I want it. When my page opens I want a “peace” image to show, and then I click on a button to start my prompts, if I answer “Yes” I want the image of the “smiley” to show on my page in the same place the peace sign was, and when I bring my mouse on the smiley I want the “lightupsmiley” to show. Can anyone help? I cannot seem to put the images in the right spot.
<html>
<head>
<script language=”JavaScript” type=”text/javascript”>
function buttonClick()
{
var myName = prompt(“What is your first name”);
var myPage = prompt(“Do you like my webpage?”);
if (myPage==’Yes’){
document.write(“Thank You”.fontsize(4));
document.write(“<br>”);
document.body.style.backgroundcolor=”red”;
}
else if (myPage==’No’){
document.write (“Fine then”.fontsize(4)+ myName.fontsize(4));
document.bgColor=”orange”;
}
</script>
</head>
<input type=”hidden” id=”hiddenInput” runat=”server” value=””>
<body id=”mybody”>
<img id=”myimage” src=”Peace.gif”
onmouseover=”swapImageOver(smiley.jpg);”
onmouseout=”swapImageOut(lightupsmiley.gif);”>
<p id=”saying”>Welcome?</p>
<br><br>
<button onclick=”buttonClick()”>CLICK</button>
</body>
</html>