I've got a cfgrid that is displaying some program
information. I want the program number to have a link to a pop-up
window which contains an edit form for that program.
Here is the script for the popup window I used on my page
before I implemented a cfgrid:
<script type="text/javascript">
function loadEditForm(id) {
windowReference =
window.open('frmPrograms.cfm?CFGRIDKEY='+id,"editProgramWindow",'scrollbars=no,menubar=no,height=500,width=750,resizable=no,toolbar=no,location=no,status=no');
}
</script>
I've already changed the url to use the CFGRIDKEY.
Here are my cfgridcolumns:
<cfgridcolumn name="program_id" display="no">
<cfgridcolumn name="program_name" header="Name"
bold="yes" href="?" hrefkey="program_id" width="300"
type="string_noCase">
<cfgridcolumn name="description" header="Description"
width="650" select="no">
I tried making the program_name cfgridcolumn have an
href="javascript:loadEditForm(#URLEncodedFormat(Trim(program_id))#)"
but this isn't working. I get an error message that the variable
program_id doesn't exist.
I've done a grid that links to an edit form in another
section, the difference is that wasn't using a pop-up window. And I
can send my form to a new window using target=_blank, but I really
would rather use a pop-up window for this.