• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cfwindow javascript error

Community Beginner ,
Nov 20, 2009 Nov 20, 2009

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.

TOPICS
Advanced techniques

Views

3.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2009 Nov 22, 2009

Copy link to clipboard

Copied

Make sure the page win.cfm exists within the current directory.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2009 Nov 22, 2009

Copy link to clipboard

Copied

Nope. This file exists in current directory.Here is error message :

error.GIF

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 22, 2009 Nov 22, 2009

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2009 Nov 23, 2009

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 23, 2009 Nov 23, 2009

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?.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2009 Nov 23, 2009

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 23, 2009 Nov 23, 2009

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 23, 2009 Nov 23, 2009

Copy link to clipboard

Copied

Yeah.. Adam is 100% correct..

When I created one test template with "windowSource.cfm" it worked perfectly.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2009 Nov 23, 2009

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 23, 2009 Nov 23, 2009

Copy link to clipboard

Copied

Your windowSource.cfm code works well for me.. Not sure what goes wrong there?. Have you checked your logs?.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 23, 2009 Nov 23, 2009

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2009 Nov 23, 2009

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation