473,396 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Element XXX is undefined in FORM But Only Sometimes

I'm supporting a web site (6 web servers and 2 DB servers) that's using ColdFusion MX Version: 6,1,0,83762. We have logging set up where we get email notification of errors. We have gotten 90 of these errors, since Oct. 2007, about undefined form elements, but they are clearly defined on the page. There are 10 different pages that this error has occurred on. And it's happening with users using both IE 6 and IE 7. It’s happening with both <cfform> and <form>. Some are text and some are checkboxes. Some pages post to themselves and some posts to a hidden window. And to top it off, I am unable to duplicate this issue in dev or production (nice, right?). Here are two examples of undefined values:

Expand|Select|Wrap|Line Numbers
  1. <td>$<input type=text name="targprice" value="#Trim(NumberFormat(targprice,'999999.99'))#" tabindex="6" id=numberinput size="9" onFocus="select();" onBlur="doFormatCurrency(this);"></td>
  2.  
  3. <input type="checkbox" name="procs" value="#UrlEncodedFormat(sql)#" #chk#>
I've tried setting the database fields in question to null thinking that CF may be removing these fields because they are null but I'm still unable to reproduce it. I’ve also tried adding single and double quotes to some of the database fields and was unable to reproduce it.

Has anyone experienced this or have any ideas?
Apr 8 '08 #1
8 5959
acoder
16,027 Expert Mod 8TB
Welcome to bytes.com!

Roughly how many requests are we talking about out of which you've got 90 error pages?

To avoid the errors, you can use cfparam to define default values for them.

Can you show the code where the error actually occurs?
Apr 9 '08 #2
Looking at the logs on all of the web servers for yesterday, one of the pages in question got 448 requests. If you multiple that by 170 days (Since Oct 25th) that puts it in a rough estimate of 76,000 request. Out of these requests, we 6 errors about one field that was missing, and another 6 errors about a different field that was missing. So this one page is throwing an error roughly .02% of the time. So it’s not happening that much per page, but the thing is, its multiple pages doing it as well.

I’ll try using cfpram to the pages. That should do the trick, but it doesn’t explain what’s causing the form elements to not get rendered. So it might mask the underlying issue and pass it along to the next form element or another part of the page.

Sorry, but I talked to my project manager and even after I tried to mask the sensitive information on the page, he still didn’t feel comfortable with me posting the code. But the form and elements are clearly defined on the page. The only thing that I can see that could possibly cause an issue is some of the elements are being formatted and set by JavaScript. But we require that JavaScript be enabled, and there's just no way a user could make it this far in the application if they didn't have it enabled. In addition, I’ve tried testing locally by setting the elements to null, they are still rendering for me.

I did read a thread that was similar about having multiple pages and multiple forms that could cause possible cause the wrong form to get submitted. And being that the web site uses some of the same form name for different pages, and then this raises an interesting point. But I was still unable to even duplicate this hypothesis.

Any thoughts/Ideas/Comments?
Apr 9 '08 #3
acoder
16,027 Expert Mod 8TB
I forgot to ask what browser users were using. If it's Internet Explorer, this might help solve your problem.
Apr 10 '08 #4
We only support IE and we recommend that our client upgrade to IE 7. But as far as I know, all users are using either IE 6 or IE 7. Also the issue is occurring using both IE 6 and IE 7.

I'm trying to get the numbers for the load on the system at the time of these errors to see if there's a relationship there. On a normal day we peak around 70-75 hits per second, but on bad days we'll peak around 120 - 125. On these days we've seen ColdFusion get out of whack and have to restart itself. It seems like jrun starts using up a lot of memory during that time as well. But I just don’t see what that has to do with form elements? Who knows it might not have anything to do with it, but I guess it’s worth investigating.

We are building a new web server, upgrading it to IIS 6 and looking at upgrading ColdFusion to see if that helps out. In our development environment it seems to be running a lot faster. Hopefully we'll get that deployed in the next week or two without too many issues. This way we can see if the error still occur on the other web servers and stop on the new one (we'll cross our fingers).
Apr 10 '08 #5
acoder
16,027 Expert Mod 8TB
It is an old technote, so the issue may affect IE7 too.

Anyway, good luck with the new servers.
Apr 10 '08 #6
So you'd say it's probably an IE issue instead of a CF issue?
Apr 10 '08 #7
acoder
16,027 Expert Mod 8TB
Possibly. You could try the workaround on the server-side (increase or disable the HTTP keep-alive timeout) as explained in the Microsoft KB article.
Apr 11 '08 #8
calexander,

Did you ever find a solution to this problem. I'm facing the same issue and can't figure it out.
Feb 14 '11 #9

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

Similar topics

2
by: Martin O'Rourke | last post by:
All, I am hoping someone might be able to put me out of my misery and let me know if it is possible or not to dervie the name of an element in a form, based on its associated label, only knowing...
1
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function...
1
by: Stanimir Stamenkov | last post by:
Here's an example: <form action="bogus" method="post"> <p> <a href="prev.cgi"><input type="submit" name="prev" value="< Back"></a> <a href="next.cgi"><input type="submit" name="next"...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
6
by: Luke Dalessandro | last post by:
I'm not sure if this is the correct forum for platform specific (Mozilla/Firefox) javascript problems, so just shout and point me to the correct newsgroup if I'm being bad. Here's the deal... ...
8
by: Doug Lerner | last post by:
I have this snippet of client side code running: var makeField = document.forms; alert("makeFieldName name,length,type=" + makeFieldName + ", " + makeField.name + "," + makeField.length + ","...
8
by: bennett.matthew | last post by:
Hello all, This is probably an elementary (no pun intended) question, but I've spent all afternoon on it and it's driving me crazy. I have a function which dynamically adds to a table. It...
8
by: jesmi | last post by:
my code is: addRecord.cfm <cfinclude template="head.cfm"> <p> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td> <div align="center">
3
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...

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.