Copy link to clipboard
Copied
When I use following coding in my project, I got javascript error. This error shows as follow :
error: http: Error retrieving markup for element editWindow_body : Not Found......
<cfajaximport tags="cfwindow">
<script>
function makeWin(x,y) {
ColdFusion.Window.create('mywin','Windows Rules','win.cfm',{x:x+25,y:y+25});
}
</script>
<h2>Test</h2>
<p>
This is the test <a href="" onclick="makeWin(event.pageX,event.pageY);return false;">link</a>.
</p>
All responses will be appreciated.
Copy link to clipboard
Copied
Make sure the page win.cfm exists within the current directory.
Copy link to clipboard
Copied
Nope. This file exists in current directory.Here is error message :
Copy link to clipboard
Copied
Hi,
I recently came across this blog, where I found something like, If we have any variables (or) form controls named as "action", then this error is bound to occur...
Here is the link,
http://blog.garthe.com/index.cfm/2008/1/2/CFWINDOW-and-CFFORM-doesnt-like-action-hidden-form-variable
HTH
Copy link to clipboard
Copied
It's kinda useful link. But, it can't erase javascript error from my page. For this error, do I need to do any configuration in CFADMINISTRATOR?
Copy link to clipboard
Copied
Hi,
That means you tried changing those occurences of "action" into some other name, and still you face the same issue?.
Can you please post your complete code here if possible?.
Copy link to clipboard
Copied
<cfajaximport tags="cfwindow">
<script>
function makeWindow(ID) {
var d = new Date();
var curr_hour = d.getHours();
var curr_min = d.getMinutes();
var curr_sec = d.getSeconds();
ColdFusion.Window.create(curr_hour + curr_min + curr_sec,"The Title","windowSource.cfm?ID=" + ID,
{center:true,modal:true,width:800,height:600,resizable:false});
}
</script>
<a href="##" onClick="makeWindow('MyWin')">Open Window</a>
Copy link to clipboard
Copied
So what's in the windowSource.cfm file? The error is complaining about that file, not the mainline code.
--
Adam
Copy link to clipboard
Copied
Yeah.. Adam is 100% correct..
When I created one test template with "windowSource.cfm" it worked perfectly.
Copy link to clipboard
Copied
Here is coding in windowSource.cfm. But, whenever I click on the link of main file, error come out just like before.
<html>
<head>
<title>Test</title>
</head>
<body>
<cfoutput>#ID#</cfoutput>
</body>
</html>
Copy link to clipboard
Copied
Your windowSource.cfm code works well for me.. Not sure what goes wrong there?. Have you checked your logs?.
Copy link to clipboard
Copied
It works for me too.
What happens if you browse directly to windowSource.cfm, providing it with the correct URL param?
The windowSource.cfm call is a separate request... could an Application.cfm or onRequestStart() call be contributing to this?
--
Adam
Copy link to clipboard
Copied
Oh gosh..!! Thanks all. It's because of my application.cfm file. When I create new website and make like before, it's fine.
Thanks for your time all.