I am facing issue in my code. It gives a javascript error in IE8,
"SCRIPT1028: Expected identifier, string or number"
My code,
<cfoutput>
<cfif iPro eq "M">
<cfset iIdLock = #DecryptX(iId)#>`
<script>
window.onbeforeunload = function(){
var hook = true;
if(hook){
var r="#iIdLock#";
$.ajax({
type:'POST',
async:false,
url:"setlock.cfm",
data:"s="+r,
success: function(){},
error: function(){},
});
}
}
</script>
</cfif>
</cfoutput>
What could be the issue?