473,498 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Runtime Error for text limiting

nkerzman
1 New Member
Hello and thanks for your time.

I'm working with a developer and I'm a little frustrated because when using the Web application he created I get a runtime error. I dug a little deeper and I it appears to be this function noted below. Unfortunately JS isn't my strong point.

If anyone has any insight I would appreciate it greatly.

Error: 'undefined' is null or not an object

This is the function:

Expand|Select|Wrap|Line Numbers
  1. function limitText(limitField, limitCount, limitNum) {
  2.     if (limitField.value.length > limitNum) {
  3.         limitField.value = limitField.value.substring(0, limitNum);
  4.     } else {
  5.         limitCount.value = limitNum - limitField.value.length;
  6.     }
The error says it is on the limitCount line.

Here is an example of the function being used on the form:

Expand|Select|Wrap|Line Numbers
  1. onKeyDown="limitText(this.form.txtMaintenanceComments,this.form.countdown,1000);"
the onKeyUp is the same

Thanks again, I appreciate it.

<exiting... off to CSS dicussions to see if I can offer any insight there>
Apr 4 '07 #1
1 1037
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN!

I tested this and it works fine. Post your form markup - there may be a problem in that.
Apr 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
12203
by: wideangle | last post by:
Hello there! I know it's stupid, but when creating a table in a mysql (win32) database, it won't let me create this "mytable". Here goes my ER_PARSE_ERROR. mysql> CREATE TABLE `mytable` ( ->...
13
4199
by: Lee | last post by:
Hello All, First of all I would like to say thank you for all of the help I have received here. I have been teaching myself Access for about 4 years now and I've always been able to find a...
8
5954
by: Nanda | last post by:
hi, I am trying to generate parameters for the updatecommand at runtime. this.oleDbDeleteCommand1.CommandText=cmdtext; this.oleDbDeleteCommand1.Connection =this.oleDbConnection1;...
7
2841
by: Yongsub Eric Shin | last post by:
Hi. I'm just a beginner in ASP.Net. I started writing codes and I keep on getting this Runtime Error page, where it says "Description: An application error occurred on the server. The current...
6
2354
by: Bill Patel | last post by:
I am getting Runtime error on line 50. Please Help. Thank You Bill 1 <%@ Page Language="VB" %> 2 <%@ import Namespace="System.Data" %> 3 <%@ import Namespace="System.Data.SqlClient"...
7
1862
by: Charlie Brookhart | last post by:
I have a program (posted below) that is supposed to take liters, which is the user input, and convert it to pints and gallons. The pints and gallons are displayed in a read only textbox. I don't...
4
1958
by: rushikesh.joshi | last post by:
Hi All, I have created my own WebControl and want to add it in my aspx page at runtime. it's compiling perfectly, but when i m going to execute, it gives me error of "Object reference not set...
7
1774
by: wazdakka | last post by:
I'm confused about what is necessary to distribute an Access 2003 application to people that don't have MS Access (or don't have the right version) installed on their PCs. I have done some...
7
31399
by: ruvi | last post by:
I am getting runtime error 3021 - Either EOF or BOF is true or the current record has been deleted..... I have 2 combo boxes in a form- One for the client and the other for the project. When the...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.