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

To open in new window

New Here ,
Jun 25, 2009 Jun 25, 2009

Copy link to clipboard

Copied


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")
{

  idisplay.style.display="block";
}
else
{

  idisplay.style.display="none";
}
}
</script>

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

<div id="player1" style="display:none">
<table>
  <tr>
<td>
<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>
</OBJECT>     
</td>
</tr>
</table>
</div>

TOPICS
Advanced techniques

Views

688

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
LEGEND ,
Jun 25, 2009 Jun 25, 2009

Copy link to clipboard

Copied

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.

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
Contributor ,
Jun 25, 2009 Jun 25, 2009

Copy link to clipboard

Copied

Please try this

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

myWindow=window.open('file2.cfm','file2','width=400,height=400')

}
</script>

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

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
Guest
Jun 28, 2009 Jun 28, 2009

Copy link to clipboard

Copied

LATEST

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">

<html>

<head>

     <script>

</script>

               <body>

    

     </body>

   </cfwindow>

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

Ali

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