Solved

onmouseout/onmouse over

Posted on 2004-11-02
246 Views
Last Modified: 2010-08-05
Does anyone know why I can not use the onmouseover onmouseout javascript function on a div tag in asp.net.

I have used this method for years but in VS 2003 it tell me that onmouseover onmouseout is not an element of the div tag.

Cheers

Wayne
0
Question by:watherton
    5 Comments
     
    LVL 13

    Expert Comment

    by:dungla
    just use it and ignore the warning by VS 2003. Till working

    Hope this help
    .:: LDLP ::.
    0
     

    Author Comment

    by:watherton
    cheers will carry on. Strange that it does not pick this up though, and there I was thinking I was working with the latest technology!

    Wayne
    0
     

    Author Comment

    by:watherton
    Oh by the way, just to add, the events do nothing in the browser. They do no do any mouse over or onmouseout.

    Wayne
    0
     
    LVL 13

    Accepted Solution

    by:
    watherton,

    I use VS 2003 and till working correctly, here is my example code. My VS 2003 displayed IntelliSense for onmouseout and onmouseover of <div> tag.

    <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="Test1.WebForm1" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
          <HEAD>
                <title>WebForm1</title>
                <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
                <meta name="CODE_LANGUAGE" Content="C#">
                <meta name="vs_defaultClientScript" content="JavaScript">
                <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
                <script language="javascript">
                      function out(){
                            alert("Mouse out");
                      }
                      function over(){
                            alert("Mouse over");
                      }
                </script>
          </HEAD>
          <body MS_POSITIONING="GridLayout">
                <form id="Form1" method="post" runat="server">
                      <div onmouseout="out();" onmouseover="over();">Test Mouse Out/Over</div>
                </form>
          </body>
    </HTML>

    ==========

    Hope this help
    .:: LDLP ::.
    0
     

    Author Comment

    by:watherton
    Dungla, that seemed to work fine, maybe it was something I was doing.

    Thank you for that.

    Wayne
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
    Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
    Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    845 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now