Skip to main content
November 17, 2008
Question

CFGRID HTML named target will not open new window

  • November 17, 2008
  • 2 replies
  • 403 views
I'm finally TRYING to make the move to CF8 and honestly I love Cold Fusion but I encounter bug after bug without going crazy trying to do things. I'd appreciate any guidance here.

In this case I am trying to switch over from applet CFGRIDS to HTML CFGRIDS. Right off the bat all sorts of issues.

1) CFGRID HTML target does not work as expected. If you put a named window in (e.g. gridpopup) you get an error message that it doesn't exist. This is not the way the applet grid works in any version including CF8. I don't want to allow someone to keep opening up window after window in this case. This is a showstopper as I have many cases where I need to do this.

2) A defined checkbox column displays true and false. Since this isn't editable I can probably change it to Yes and No but come on. This might be because I'm using a bit field in my Sybase database ?????? Not sure if it works or doesn't with other field types. Works fine with the applet cfgrid

3) This one can probably be styled away, I don't want the URL columns underlined.
    This topic has been closed for replies.

    2 replies

    November 19, 2008
    First, I can't believe no one else is encountering this problem

    Here's the fix which allows you to use mixed case target names and will also open a non-existent target. Someone was very lazy when they coded this.

    Locate the cfgrid.js file e.g. ..//CFIDE/scripts/ajax/package

    Find this chunk of code

    if(_2a3){
    _2a3=_2a3.toLowerCase();
    if(_2a3=="_top"){
    _2a3="top";
    }else{
    if(_2a3=="_parent"){
    _2a3="parent";
    }else{
    if(_2a3=="_self"){
    _2a3=window.name;
    }else{
    if(_2a3=="_blank"){
    window.open(encodeURI(url));
    return;
    }
    }
    }
    }
    if(!parent[_2a3]){

    and replace with this chunk of code

    if(_2a3){
    _2a3_LC=_2a3.toLowerCase();
    if(_2a3_LC=="_top"){
    _2a3="top";
    }else{
    if(_2a3_LC=="_parent"){
    _2a3="parent";
    }else{
    if(_2a3_LC=="_self"){
    _2a3=window.name;
    }else{
    if(_2a3_LC=="_blank"){
    window.open(encodeURI(url));
    return;
    }else{
    if(!parent[_2a3]){
    window.open(encodeURI(url),_2a3);
    return;
    }
    }
    }
    }
    }
    if(!parent[_2a3]){

    Participant
    December 4, 2008
    You mention that you never had this problem using CFGRID Applet....however, I am having that problem (or I should say that I don't know how to manipulate the settings) in my CFGRID Applet to get a link to open a new window. My link works fine, but takes me away from my current grid page. I have a long list of data in my grid (over 400 rows), so when I scroll down and then click on a link...a return to my grid takes me right back to the top of the page and I have to scroll down again. This is further irritating because any changes that I have made to my grid data (EDIT) are lost when I navigate away from the grid to follow the link.

    How do I make my link open up a small, new window to display data without taking the user away from the grid page?

    Thanks for any help.
    November 17, 2008
    Couldn't find anything obvious for number 2 either, anyone?