open player in a new window

By muffin, 5 years ago.

I've made a js code to open a window and write the player in it, but it does nog work.
this is the code:
function OpenVid(video,title)
{
VidFrame= window.open ("",
"title","status=1,width=400,height=340");
VidFrame.document.write('<object width=/'400/' height=/'340/' id=/'flvPlayer/'>
<param name=/'allowFullScreen/' value=/'true/'>
<param name=/'movie/' value=/'player.swf?movie='video'&autoload=on&autorewind=on&volume=70/'>
<embed src=/'player.swf?movie=Vid.flv&autoload=on&autorewind=on&volume=70/' width=/'400/' height=/'340/ allowfullscreen='/'true/' type=/'application/x-shockwave-flash/'>
</object>');
}'

what is wrong?

muffin
Member

Ive checked it out myself and I found a few mistakes, this is an update(its neater too):

function OpenVid(video,title)
{
var VidCode;
var video;
var title;
var scrmset = "'about:blank', title,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=400,height=340,left=0, top=0,screenX=0,screenY=0'";
;
var VidcodeP2 =
VidFrame= open(scrnset);
var VidCode = = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><body><object width=\'400\' height=\'340\' id=\'flvPlayer\'><param name=\'allowFullScreen\' value=\'true\'><param name=\'movie\' value=\'player.swf?movie="+video+"&autoload=on&autorewind=on&volume=70\'><embed src=\'player.swf?movie="+video+"&autoload=on&autorewind=on&volume=70\' width=\'400\' height=\'340\' allowfullscreen='\'true\' type=\'application/x-shockwave-flash\'></object></body></html>";
VidFrame.document.write(VidCode);
};

and this is what Ive entered:
< a href="void(0)" onclick=ÖpenVid'(&nquoteMovies/Vid.flv&nquote,&nquotede titel hier&nquote)">video</a>
my internet exxplorer says that that line is wrong on the first sign, object missing. what does that actualy means? because Ive defined evry object.

Posted 5 years ago #

muffin
Member

Im sorry for the second bump but I cant edit my post....
this is the actual script (without mistakes for as far as I understand js.)
@ admin would you please remove my previous post? Htank you in advance.

//--

Ive checked it out myself and I found a few mistakes, this is an update(its neater too):

function OpenVid(video,title)
{
var VidCode;
var video;
var title;
var scrmset = "'about:blank', title,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=400,height=340,left=0, top=0,screenX=0,screenY=0'";

VidFrame= open(scrnset);
var VidCode = = "<html><title>"+title+"<\/title><body><object width='400' height='340' id='flvPlayer'><param name='allowFullScreen' value='true'><param name='movie' value='player.swf?movie="+video+"&autoload=on&autorewind=on&volume=70'><embed src='player.swf?movie="+video+"&autoload=on&autorewind=on&volume=70' width='400' height='340' allowfullscreen='true' type='application\/x-shockwave-flash'><\/object><\/body><\/html>";
VidFrame.document.write(VidCode);
};

and this is what Ive entered as link:
< a href="javascript:void(0)" onclick="OpenVid("Movie/test.flv","de titel hier")">video< /a>
my internet exxplorer says that that line is wrong on the first sign, object missing. what does that actualy means? because Ive defined evry object.

Posted 5 years ago #


RSS feed for this topic

New Topic

You must log in to post.

Copyright Jambo Media, LLC 2009

Powered by WordPress - Created by Tommaso Baldovino