Many of the built-in CF stuff requires your javascript function declarations
to be in the form of:
destroyWin = function(){
//stuff
}
Not sure if that's the case here, but worth a shot.

On Fri, Jul 16, 2010 at 2:15 PM, Peter Terhorst <[email protected]>wrote:

>
> I'm opening a modal window and then when the form in that window is
> submitted, destroying the window with ColdFusion.Window.destroy.
>
> I need the window to be destroyed because it will be opened multiple times
> from the parent window and I need the URL of the modal window to refresh
> each time it opens.
>
> On Apache under Windows (xampp), my code works nicely but after porting it
> to our staging server where Apache runs under LINUX,
> ColdFusion.Window.destroy throws an error: "ColdFusion.Window.destroy is not
> a function".
>
> I've confirmed that both servers are running the same version of CF
> (8,0,1,195765), up to date with all hotfixes.
>
> I don't think it will help, but here is my code, used for opening and
> closing the window.  Any guesses or known history of a similar problem?
>
> the opener:
> <script>
> $(document).ready(function() {
>
>  $("#addbutton").click(function() {
>    // obtain the selected categoryID and sent it to dsp_paq.cfm to show
> associated questions
>    var selectedVal = $("#categoryID option:selected").val()
>    var splitRes = selectedVal.split("|");
>    var categoryID = splitRes[0];
>    var qCnt = splitRes[1];
>    if(categoryID==0) {
>      alert('Please select a Practice Area to add.');
>    } else {
>      if(qCnt==0){
>        // if no questions just add the PA
>
>  
> $.get('Client2/Apply/act_saveAnswers.cfm?categoryID='+categoryID,{},function(data){
>          $("#practiceAreas").html(data)
>        })
>      } else {
>        // show the modal popup for questions
>        ColdFusion.Window.create('answindow','Practice Area
> Questions','Client2/Apply/dsp_paq.cfm?categoryID='+categoryID,{center:true,modal:true})
>        ColdFusion.Window.onHide("answindow", destroyWin);
>      }
>    }
>    return false
>  })
>
> });
>
> function destroyWin() {
>    // delete the window
>    ColdFusion.Window.destroy('answindow',true);
>    }
>
> </script>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335430
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to