Onmouse over

Joined
Feb 24, 2011
Messages
1
Reaction score
0
Hi i am trying to convert the the following html code to asp.net mvc code. I've already moved the style header into a site.css file and i want to move script header into the site.master file.

It seems that the "onmouseover" function creates a runtime error. ANY help would be greatly appreciated.

THANKS

Suhail Alam

<html>

<head>
<title>link box</title>

<style>
#messageBox{
border-right: 1px solid #000000;
position: absolute;
width: 400px;
height: 150px;
z-index: 1;
background-color: #C0C0C0;
border-style: solid;
border-width: 1px;
display:none;
}

#closeButt{
width: 100%;
height: 25px;
z-index: 1;
cursor: pointer;
left: 0px;
top: 0px;
background-color: #808080;
}

#contents{
width: 100%;
height: auto;
z-index: 2;
}
</style>

<script type="javascript">
function show(obj,msg){
messageBox.style.top=obj.offsetTop
messageBox.style.left=obj.offsetLeft+obj.offsetWidth+5
contents.innerHTML=msg+"<p>"+obj.href
messageBox.style.display="block"
}
</script>

</head>




<body>

<p><a onmouseover="show(this,' This popup box is for information on electricity monitoring for the whole HOUSE.')">Whole House</a></p>

<p><a onmouseover="show(this,' This popup box is for information on electricity monitoring for the Individual Circuits')">Individual Circuits</a></p>

<p><a onmouseover="show(this,' This popup box is for information on electricity monitoring for the Individual Devices')">Individual Devices</a></p>

<div id="messageBox">
<div onclick="messageBox.style.display='none'" id="closeButt"> X Click to close</div>
<div id="contents"></div>
</div>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top