3 Replies Latest reply on Jun 28, 2009 3:01 PM by CF_Ali

    To open in new window


      Can somebody help me to solve the below code issue - when user clicks on the "flash1.swf", I want to open in new window and play the media player?

      Right now below code plays at same place....




      <script language="JavaScript">
      function Player(whichone,cnt)
      var idisplay = document.getElementById(whichone);

      if (idisplay.style.display ==  "none")



      <a href="##" onclick="Player('Player1','temp1');" style="vertical-align:top;">flash1.swf</a>


      <div id="player1" style="display:none">
      <OBJECT ID="temp1" WIDTH="255" HEIGHT="250" CLASSID="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"
        VIEWASTEXT  TYPE="application/x-mplayer2">
      <PARAM NAME="URL" VALUE="flash1.swf">
      <PARAM name="autostart" VALUE="false">
      <PARAM name="ShowControls" VALUE="true">
      <param name="ShowStatusBar" value="true">
      <PARAM name="ShowDisplay" VALUE="false">
      <EMBED TYPE="application/x-mplayer2" SRC="flash1.swf" NAME="MediaPlayer" WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="1" ShowDisplay="0" autostart="0"> </EMBED>

        • 1. Re: To open in new window
          Dan Bracuk Level 5

          write a separate page, newpage.cfm that has the code to run the player.


          call it like this

          <a href="newpage.cfm" target = "_blank">text </a>


          add url variables as required.

          • 2. Re: To open in new window
            Dileep_NR Level 2

            Please try this


            <script language="javascript">
            function viewPopUp(arg1,arg2)





            <a href="##" onclick="viewPopUp('Player1','temp1')" style="vertical-align:top;">flash1.swf</a>

            • 3. Re: To open in new window

              Hi there,

              how about you use the new cfwindow tag? heres what you can do, ceate a cfwindow then pass on your javascript variable, and display the code in there. Now, note that cfwindow takes full html syntax. For example, an <html> tag down to end </html>. Ill how you an example:

              <cfwindow name="example" title="here is my video" modal="yes" initshow="false">










              and now initialize your content in the cfwindow, and make it dynamic with whatever you wanna display using javascript. Get creative

              please let me know if that helped