Onmouse over

Discussion in '.NET' started by salam123, Feb 24, 2011.

  1. salam123

    salam123

    Joined:
    Feb 24, 2011
    Messages:
    1
    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>
     
    salam123, Feb 24, 2011
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cesar Zam
    Replies:
    0
    Views:
    354
    Cesar Zam
    Nov 6, 2003
  2. someone

    FTP over SSL vs FTP over SSH

    someone, Apr 24, 2004, in forum: Java
    Replies:
    1
    Views:
    4,636
    iksrazal
    Apr 25, 2004
  3. zach.bastick@gmail.com

    RMI only works over network and not over internet

    zach.bastick@gmail.com, Feb 19, 2005, in forum: Java
    Replies:
    7
    Views:
    6,809
    Alex Molochnikov
    Feb 23, 2005
  4. Jairo Nieto

    onmouse over in datagrid

    Jairo Nieto, Feb 18, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    8
    Views:
    214
    Alvin Bruney [MVP]
    Mar 3, 2004
  5. bigoxygen@gmail.com

    OnMouse

    bigoxygen@gmail.com, Mar 21, 2005, in forum: Javascript
    Replies:
    1
    Views:
    118
    Zifud
    Mar 21, 2005
Loading...

Share This Page