onblur issue in .net 2.0

Posted on 2007-07-30
Last Modified: 2013-11-07
i have the following in .net 2.0:
<asp:TextBox id="txtDepartureFrom" onblur="TextChanged(me)" Runat="server"></asp:TextBox>

which calls
Public Function TextChanged(ByVal oTextbox)
                              sNewDate = FormatDate(oTextBox.value)
                              oTextBox.value = sNewDate

im getting the error:
"me is undefined"

i cant see why can any1 help?
                        End Function
Question by:scm0sml
    LVL 96

    Accepted Solution

    Try this:

    <asp:TextBox id="txtDepartureFrom" onblur="TextChanged(this)" Runat="server"></asp:TextBox>

    LVL 18

    Assisted Solution

    The keyword "me" represents the current object in VB, but the onblur function is javascript code that will be executed on the client side.  You need to use "this" which represents the current element in javascript, just like TheLearnedOne mentioned.


    Author Comment

    yeah that now works fine.

    is this problem something that has been introduced in .net 2.0?
    LVL 96

    Assisted Solution

    by:Bob Learned
    I have never known 'Me' to work.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    User art_snob ( encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    737 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

    20 Experts available now in Live!

    Get 1:1 Help Now