nwd12a nwd12a - 1 year ago 92
Javascript Question

Using Mouseover to Send the user to a new page

So, for an assignment I need to describe images to a user. The way the instructor wants it done, I need to use the "mouseover" javascript method to send the user to a page describing the image.

This is what I have so far, but I cannot get it to work.

<div class="image1">
<img id="solomid" src="Team_SoloMid.png" alt="Team Solomid Logo" style="width:300px;height:228px">

<script type="text/javascript">
document.getElementbyId("solomid").addEventListener("mouseover", Mouseover);

function Mouseover(){
window.location = "https://en.wikipedia.org/wiki/Team_SoloMid";

Can anyone help me? I've a couple variation of this, but I can never get the mouseover to actually redirect the user to a page.
And yes, the page is about League, writing programs about stuff I'm interested in helps break up the monotony.

Answer Source

document.getElementbyId Is not a function. The "b" in "by" must be capitalized. Also, remove the line Mouseover(); so that users aren't immediately redirected.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download