One popup good - two popups bad?

Discussion in 'Programming' started by garrettdr, Dec 6, 2007.

  1. #1
    Hi All - I have created created a Cold Fusion flash form popup on my form using code from AsFusion.com. It works great. However when I try and add another popup to the same form the form just hangs. Here is a working example: http://www.carbonacs.com/poptest.cfm

    the CF script calls a MXML script which is stored in a text file - all of which I include below

    I have changed the variable and function names in my second popup so I don't see what could be the problem. Any help is gratefully recieved.


    COLDFUSION CODE:

    ************************************************

    <cfformitem type="script">
    public var myWindow2:Object;

    private function createPop2(sel:Object){

    var initObj:Object = {closeButton:true};
    myWindow2 = mx.managers.PopUpManager.createPopUp(this, myWindowMXML, true, initObj);


    myWindow2.centerPopUp();
    myWindow2.addEventListener("click", close);
    }

    private function close():Void
    {
    this.deletePopUp();
    }

    </cfformitem>

    <cfinput type="button" name="button2" value="Show Window" onclick="createPop2(_global.sel);">

    ***************************************************

    MXML CODE

    *********************************************************************************



    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="http://www.macromedia.com/2003/mxml" width="300" height="400" title="MXML Popup" panelBorderStyle="roundCorners">

    <mx:Label text="This is a test" width="250"/>


    </mx:TitleWindow>








    ******************************************************************************
     
    garrettdr, Dec 6, 2007 IP
  2. garrettdr

    garrettdr Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just to let you know I've sorted it so need to reply - I'm using a modifed alert box.
     
    garrettdr, Dec 6, 2007 IP