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

Need to have a popup window from a link in a cfgrid

Explorer ,
Mar 05, 2008 Mar 05, 2008

Copy link to clipboard

Copied

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.
TOPICS
Advanced techniques

Views

465

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
Advisor ,
Mar 05, 2008 Mar 05, 2008

Copy link to clipboard

Copied

LATEST

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