-
1. Re: CFDatefield not working in FF
The Limit Apr 23, 2009 10:14 AM (in response to nonnybonny)Robert,
Did you ever get an answer on this? I'm having the same issue in both Firefox and IE 6.
-Eric
-
2. Re: CFDatefield not working in FF
Stoney856 Sep 21, 2010 11:49 AM (in response to nonnybonny)You need to add the name and id attributes to the cfform. That should work.
-
3. Re: CFDatefield not working in FF
MikeInAustin Aug 7, 2012 5:59 PM (in response to nonnybonny)Same issue with a slight variation occurs in CF10. This being updated code, it's a slightly different error:
_10d=_10c.split("/"); Where 10c is undefined.
Stoney856's answer reminded me of the need for an ID, but after adding that, it still didn't work.
Turns out, I had two CFFORM's with the same ID on the page. So the calendar gets confused as to what form element we're talking about. So check for duplication of IDs on the page as well.
-
4. Re: CFDatefield not working in FF
DAYohn Oct 19, 2012 1:38 PM (in response to nonnybonny)I am having a very similar issue, but the reverse - IE9 doesn't work, but IE8, FF, and Chrome all work fine. The error:
SCRIPT5007: Unable to get value of the property 'split': object is null or undefined --> Line 43: _10d=_10c.split("/");
The field has both name and id, as does the CFFORM. (There is only one CFFORM on the page.) I am event calling the CFAJAXIMPORT at the beginning of the file.
<cfajaximport tags="cfform,cftextarea,CFINPUT-DATEFIELD">
<cfform
name="registration" id="registration" method="post" action="#cgi.SCRIPT_NAME#">Funny thing though, on the exact same code, but in another page, it works fine in all browsers.
<cfinput type="datefield" name="udf_43" id="udf_43" class="editbody" style="width:255px;" validate="date" validateat="ONSUBMIT"
required="yes" message="Required Field: Please enter the information for - BIRTHDATE.">
So, what is the fix?
-
5. Re: CFDatefield not working in FF
BKBK Oct 25, 2012 1:34 AM (in response to DAYohn)I tested the following code, which is equivalent to yours. It works as expected, no sweat.
<cfajaximport tags="cfform,cftextarea,CFINPUT-DATEFIELD">
<cfform name="registration" id="registration" method="post" action="#cgi.SCRIPT_NAME#">
<cfinput type="datefield" name="udf_43" id="udf_43" class="editbody" style="width:255px;" validate="date" validateat="ONSUBMIT"
required="yes" message="Required Field: Please enter the information for - BIRTHDATE.">
<cfinput type="submit" name="sbmt" value="send">
</cfform>
<cfif isdefined("form.udf_43")>
<cfdump var="#form#">
</cfif>
My versions are:
ColdFusion: 10,0,3,283145
Internet Explorer: 9.0.8112
It might help to update your IE 9 browser or ColdFusion build.
-
6. Re: CFDatefield not working in FF
BKBK Oct 25, 2012 1:50 AM (in response to BKBK)I did another test. I let the submit input tag share the same id as the datefield, namely, udf_43. I then opened the page in Firefox(16.0.1), with Firebug switched on. The result was a Javascript error: "_10c is undefined". I suppose the moral is, make sure there are no duplicate IDs on the page.
-
7. Re: CFDatefield not working in FF
DAYohn Oct 25, 2012 4:55 AM (in response to BKBK)That is the strange thing, the exact same code works on one page, but not the other. There are no duplicate IDs on the page, there is only one form on the page (with a unique ID). The error is pulling from the cfcalendar.js when referenced from a single input type=datefield (as there is only one on the form). Short of upgrading to CF10 (not currently in the budget), is there a way to troubleshoot an IE version 9 only issue?
I am using CF Enterprise 9,0,1,274733 and IE 9.0.8112.
-
8. Re: CFDatefield not working in FF
BKBK Oct 25, 2012 6:42 AM (in response to DAYohn)I have copied the relevant script below. I expect it to be the same for both ColdFusion 9 and 10.
ColdFusion.Calendar.setUpCalendar=function(_103,mask,_105,_106,_107,_108,_109){
var _10a=ColdFusion.DOM.getElement(_103+_108+"_cf_button",_108);
var _10b=ColdFusion.DOM.getElement(_103,_108);
var _10c=null;
var _10d=null;
if(_10b.value!=""){
_10c=_10b.value;
_10d=_10c.split("/");
}
What the error message is saying is that the variable _10c can be null within the if-bracket. Peculiar.I am still looking into it.
-
9. Re: CFDatefield not working in FF
BKBK Oct 26, 2012 2:44 AM (in response to DAYohn)DAYohn wrote:
That is the strange thing, the exact same code works on one page, but not the other.
I cannot reproduce the error. If the code works on one page, but not on another, have you compared the source of both pages?
-
10. Re: CFDatefield not working in FF
DAYohn Oct 26, 2012 4:58 AM (in response to BKBK)Hence my frustration. I have compared code, I cannot find any differences. It is down to something in IE9 only (can't believe IE8 works, but not IE9). So back to the troubleshooting...
-
11. Re: CFDatefield not working in FF
BKBK Oct 26, 2012 6:47 AM (in response to DAYohn)I have reproduced the error every single time by also giving the submit button an ID of udf_43. That leads me to ask: (a) What happens when you change the ID to something else, say, dayohn_43? (b) What happens when you remove the id attribute from the datefield tag?
-
12. Re: CFDatefield not working in FF
DAYohn Oct 26, 2012 7:24 AM (in response to BKBK)Interesting idea. 1. I removed the coded id. When the page renders, the id is there anyway. Still errors. 2. Renamed the field - dayohn_43. Still errors. Here is a link to the form.
-
13. Re: CFDatefield not working in FF
BKBK Oct 26, 2012 7:49 AM (in response to DAYohn)DAYohn wrote:
Interesting idea. 1. I removed the coded id. When the page renders, the id is there anyway. Still errors.
I feel we've almost cornered it. Now, a slight variation of the experiment. What happens when you test with the following code (I have changed the name attribute, too, because the built-in ColdFusion scripts may automatically generate an ID from the name)
<cfform name="registration" id="registration" method="post" action="#cgi.SCRIPT_NAME#">
<cfinput type="datefield" name="dayohn_43" class="editbody" style="width:255px;" validate="date" validateat="ONSUBMIT"
required="yes" message="Required Field: Please enter the information for - BIRTHDATE.">
<cfinput type="submit" name="sbmt" value="send">
</cfform>
<cfif isdefined("form.dayohn_43")>
<cfdump var="#form#">
</cfif>
-
14. Re: CFDatefield not working in FF
DAYohn Oct 26, 2012 8:11 AM (in response to BKBK)I entered your code for the input directly and I still get the same error every time I click the calendar icon -
Message: Unable to get value of the property 'split': object is null or undefined
Line: 43
Char: 1
Code: 0
URI: https://extapps.wvu.edu/CFIDE/scripts/ajax/package/cfcalendar.js -
15. Re: CFDatefield not working in FF
BKBK Oct 26, 2012 9:01 AM (in response to DAYohn)Please kindly leave the setting at name="dayohn_43" and send me the URL of the form. It will be just for an instant.
-
16. Re: CFDatefield not working in FF
BKBK Oct 26, 2012 9:34 AM (in response to DAYohn)Ignore my previous post. I have looked into the matter some more. To be sure, this appears to be a browser/Javascript compatibility problem, not a ColdFusion problem.
Apparently, it is well known that there are Javascript quirks in IE 9. The split() problem just happens to be one. One published workaound is to use the X-UA-Compatible metatag to get IE 9 to emulate IE8:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
-
17. Re: CFDatefield not working in FF
DAYohn Oct 26, 2012 10:23 AM (in response to BKBK)Added the X-UA-Compatible, with no change. Here is the file.
-
18. Re: CFDatefield not working in FF
BKBK Oct 26, 2012 11:27 AM (in response to DAYohn)Thanks. I have copied the page source.
-
19. Re: CFDatefield not working in FF
BKBK Oct 26, 2012 11:46 AM (in response to BKBK)Just a correction. I see on the web that a better version of the meta tag is
<meta http-equiv="X-UA-Compatible" content="IE=8" >
-
20. Re: CFDatefield not working in FF
DAYohn Oct 26, 2012 11:48 AM (in response to BKBK)Thanks. Updated. No Change.
-
21. Re: CFDatefield not working in FF
BKBK Oct 27, 2012 8:22 AM (in response to DAYohn)What a puzzler! Following some more searching I see that the meta tag must be among the first within the head tag. So I thought of testing
<cfhtmlhead text='<meta http-equiv="X-UA-Compatible" content="IE=8">'>
and
<cfhtmlhead text='<meta http-equiv="X-UA-Compatible" content="IE=7">'>
-
22. Re: CFDatefield not working in FF
BKBK Oct 27, 2012 11:15 AM (in response to BKBK)The error disappears when I put the following line as the very first line in the head tag.
<meta http-equiv="X-UA-Compatible" content="IE=8" />
However, I have so far succeeded in doing that only in a static HTML copy of your page. If only there was a way to get Coldfusion to dynamically insert the meta tag as first tag in the head! That would be a neat workaround.
I also discovered something absurd. The error disappears when I put the meta tag in onRequestStart, like this
<cffunction name="onRequestStart">
<cfargument name = "targetPage" type="String" required="true">
<cfif listLast(arguments.targetPage,"/") is "calendarTest3.cfm">
<meta http-equiv="X-UA-Compatible" content="IE=8" />
</cfif>
</cffunction>
However, though this works, it is messy. It places the meta tag at the very top of the page, even before the HTML doctype.
-
23. Re: CFDatefield not working in FF
DAYohn Oct 28, 2012 5:44 AM (in response to BKBK)Well...it works! I added the
<meta http-equiv="X-UA-Compatible" content="IE=8" /> prior to the doctype and it works. It also doesn't change the behavior in any other browser, so thanks alot!
-
24. Re: CFDatefield not working in FF
BKBK Oct 28, 2012 7:09 AM (in response to DAYohn)Glad to hear. The workaround is kludgy. So I hope you have restricted it to the specific page(s).
-
25. Re: CFDatefield not working in FF
bmelendy Mar 8, 2013 9:12 AM (in response to nonnybonny)I'm running into this myself but only with Firefox 19, Chrome, IE and Safari all work correctly. Also, it only fails on some screens, others work fine. No duplicate forms or field names. Can't figure this one out. ColdFusion 9.01. Nothing on this page has fixed my situation.
Error is " _293 is undefined" in cfcalendar.js line 43.
-
26. Re: CFDatefield not working in FF
cwhitescoe May 15, 2013 8:03 AM (in response to nonnybonny)1. Check for a <p> tag without a closing </p> tag.
2. Open beer.
-
27. Re: CFDatefield not working in FF
JMLTO May 20, 2013 7:33 AM (in response to cwhitescoe)I agree with cwhitescoe. But also check your other HTML tags. I had some bad code like this:
<table>
<cfform>
<tr><td> FORM CODE </td></tr>
</table>
</cfform>
The date picker icon would come up but woudn't show the actual date picker.
When I corrected it, by moving the cfform tag above the table tag, it worked.

