[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

onblur issue in .net 2.0

Posted on 2007-07-30
4
Medium Priority
?
287 Views
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
0
Comment
Question by:scm0sml
  • 2
4 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 1100 total points
ID: 19594022
Try this:

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

Bob
0
 
LVL 18

Assisted Solution

by:DropZone
DropZone earned 900 total points
ID: 19594877
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.

    -dZ.
0
 

Author Comment

by:scm0sml
ID: 19598289
yeah that now works fine.

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

Assisted Solution

by:Bob Learned
Bob Learned earned 1100 total points
ID: 19598860
I have never known 'Me' to work.

Bob
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Loops Section Overview
Suggested Courses

830 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