Skip to main content
Gene_Godsey
Inspiring
August 20, 2007
Question

CFAjaximport ?????

  • August 20, 2007
  • 3 replies
  • 2559 views
I am getting an error trying to bring a popup form into the cfwindow call.

The error is:
imports for tag CFForm are missing. Use CFAJAXIMPORT to import them to you main page.

Here is the given code page.
    This topic has been closed for replies.

    3 replies

    Gene_Godsey
    Inspiring
    August 21, 2007
    Great stuff guys.

    Thanks,
    Gene
    August 20, 2007
    on your employees.cfm file you do not want to use the javascript window.close() to close the window. You need to be aware the cfwindow does not create an actual pop up window but rather it creates a div layer that gets shown and hidden using the ColdFusion.Window set of functions and uses ajax to call the employee.cfm and get the content that goes into the innerHTML of the div layer. so normal java script for pop up browser windows does not apply.

    Here is how you would make a link that closes the window:

    <a href="javascript:ColdFusion.Window.hide('employeewin');"><font size="-4">Close</font></a>
    August 20, 2007
    On you purchase order template place a <cfajaximport tags="cfform"> tag so that it will import the libraries neccessary to run a cfform in a cfwindow. since you have a cfgrid in your cfwindow you will need to do <cfajaximport tags="cfform,cfgrid">

    for mor on cfajaximport read http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_a-b_2.html#3980738

    Also I wouldn't name both the text input and the button and the cfwindow all "employee", name the text input employee, the button employeeBtn, and the cfwindow employeewin or something, but not all the same name as that can potentially cause confusion and problems.