Skip to main content
August 6, 2009
Answered

DOCTYPE tag above CF's form validation javascript

  • August 6, 2009
  • 1 reply
  • 1350 views

Hi,

CF 8 seems to put the form validation javascript at the very top of the page, even before the HTML tag and the DOCTYPE validation tag.  This is causing problems with my style sheet.  Do you know of a way I can (at the very least), put my DOCTYPE tag above the javscript that CF renders?

Thank you,

David

<script type="text/javascript" src="/CFIDE/scripts/cfform.js"></script>
<script type="text/javascript" src="/CFIDE/scripts/masks.js"></script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

This topic has been closed for replies.
Correct answer BKBK

Include the head tag, to entice Coldfusion to put the script tags there. Something like this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>test page</title></head>
<body >
<cfform>
</cfform>
</body>
</html>

1 reply

BKBK
Community Expert
BKBKCommunity ExpertCorrect answer
Community Expert
August 7, 2009

Include the head tag, to entice Coldfusion to put the script tags there. Something like this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>test page</title></head>
<body >
<cfform>
</cfform>
</body>
</html>