JavaScript not working from onClick of td element of coldFusion document. It's REALLY frustrating!

For reasons beyond my sight, the onClick of my td doesn't work.  The error console tells me that the function being called is not defined.  BUT IT IS!!!  There has to be something simple that is eluding me here.  Any help would be appreciated.

Everything works, unless I try to access a function from onClick of the first table.  I am going to go poke myself in the eye now.  Should be more fun than dealing with this...
<!-------------------------------------------------
	document				element.templateForm
	author				brianmfalls
	date					08.03.2010
	last modified on		08.03.2010
	last modified by		brianmfalls
	last modified notes:	document created
!------------------------------------------------->

<cfoutput>

<cfset url.templateID = 88>
<cfset this.template = numberFormat(url.templateID, "00000")>
<cfset this.elementsPath = replaceNoCase(cgi.script_name, "index.cfm", "") & request.thisModule & "/uiElements/">


	<script type="text/javascript">
		$(document).ready(function(){
			templateBG = new Image();
			templateBG.src = "http://#cgi.http_host#/userfiles/#application.clientId#/templates/#this.template#/template_#this.template#_01.png";
			templateBG = new Image();
			templateBG.src = "http://#cgi.http_host#/userfiles/#application.clientId#/templates/#this.template#/template_#this.template#_02.png";
			templateBG = new Image();
			templateBG.src = "http://#cgi.http_host#/userfiles/#application.clientId#/templates/#this.template#/template_#this.template#_03.png";
			templateBG = new Image();
			templateBG.src = "http://#cgi.http_host#/userfiles/#application.clientId#/templates/#this.template#/template_#this.template#_04.png";
			templateBG = new Image();
			templateBG.src = "http://#cgi.http_host#/userfiles/#application.clientId#/templates/#this.template#/template_#this.template#_05.png";
			templateBG = new Image();
			templateBG.src = "http://#cgi.http_host#/userfiles/#application.clientId#/templates/#this.template#/template_#this.template#_06.png";
			templateBG = new Image();
			templateBG.src = "http://#cgi.http_host#/userfiles/#application.clientId#/templates/#this.template#/template_#this.template#_07.png";
		});
	
		$(function tryThis() {
				alert('kilroy');
			});
	
		$(function enable_ckeditor() {
				$('##ckeditorInstance').fadeIn(900);
			});
	
		$(function() {
			var config = {
				toolbar:
				[
					['Source'],
					['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck'],
					['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
					['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
					['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
					['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
					['Link','Unlink'],
					['Style','FontFormat','FontName','FontSize'],
					['TextColor','BGColor'],
				]
			};
			
			// Initialize the editor.
			// Callback function can be passed and executed after full instance creation.
			$('.jquery_ckeditor').ckeditor(config);
		});
	</script>
	
	<table cellspacing="0" cellpadding="0" class="template">
		<tr>
			<td style=" width: 628px; height: 693px; background-image: url(/userfiles/#application.clientId#/templates/#this.template#/template_#this.template#_03.png); " id="textContent" class="cluetip" title="#application.contentClue#" onclick="tryThis();" colspan="2">
				<img src="http://#cgi.http_host#/userfiles/#application.clientId#/templates/#this.template#/template_#this.template#_03.png" width="628" height="693">
			</td>
		</tr>
	</table>
	
	<div id="ckeditorInstance" class="modalForm" style=" display: none">
		<div id="floatThis" class="formBorder">
			<form action="" method="post" id="ck_form">
				<table>
					<tr>
						<td>
							<textarea class="jquery_ckeditor" cols="80" id="editor1" name="editor1" rows="10"></textarea>
						</td>
					</tr>
					<tr>
						<td style=" text-align: right; "><input type="submit" value="Place Content"></td>
					</tr>
				</table>
			</form>
		</div>
	</div>
	
	<script type="text/javascript">
		
		$(document).ready(function() {
	
			/////////////////////////////////////////////////	for ck_form instance /////////////////////////////////////////////////
			$('##ck_form').submit(function() {
				var editor = $('.jquery_ckeditor').ckeditorGet();
				var contentToPlace = $('.jquery_ckeditor').val();
				document.getElementById('textContent').innerHTML = '<div style=" width: 95%; height: 95%; overflow: hidden; margin: 0px; padding: 0px">' + contentToPlace + '</div>';
				if (contentToPlace.length >= 750) {
					$('##Notification').jnotifyAddMessage({
						text: '<h3>WARNING!!!</h3><p>If the content being placed is greater in size than its container, the excess content will be truncated (hidden).  Please verify that the content being added is complete post to placement and make corrections accordingly.</p><h4>WARNING!!!</h4>',
						permanent: true,
						type: 'error' }); }
				$('##ckeditorInstance').fadeOut(900);
				return false;
			});
		
		});
		
	</script>

</cfoutput>

Open in new window

LVL 1
brianmfallsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

soniethomasCommented:
Try changing

$(function tryThis() {
                        alert('kilroy');
                  });

to

function tryThis() {
      alert('kilroy');
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OnthraxCommented:
Add the onclick="tryThis();" to the image inside the td..
0
SandyAgoCommented:
Where do you include the jquery library?
0
brianmfallsAuthor Commented:
Why does that make the difference?  (Trying to learn.)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.