 				)
 			</cfquery>
 			<!--- allow a just-make-media option --->
-kval::#kval#
-
 			<cfif len(kval) gt 0>
-
 				<cfquery name="linkpicked" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
 					insert into media_relations (
 						MEDIA_ID,

	<cfelseif ktype is "project_id">
		<cfset tbl='project'>
	<cfelse>



	<p>

		no tbl setting stuff to null
	</p>
		<!--- allow upload without relationships; see code below before changing this ---->
		<cfset tbl=''>
		<cfset kval=''>

	  	// prefetch these to avoid 'undefined' when there's not relationship/we're just loading
	  	var kvl;
	  	var ktp;
	  	if ($("#kval").length){
	  		kvl=$("#kval").val();
	  	}
	  	if ($("#ktype").length){
	  		ktp=$("#ktype").val();
	  	}
	  	var h='<form name="nm" id="nm" method="post" action="upLinkMedia.cfm">';
	  	h+='<input type="hidden" name="ktype"  value="' + ktp + '">';
	  	h+='<input type="hidden" name="kval"  value="' + kvl + '">';
