ok, one solution popped into my head, first create three variables
in the first store:
code:
<HTML>
<TITLE>YouTube Viewer</TITLE>
<Script>
var v;
function viewVid(video){
v = video;
document.getElementById("vid").innerHTML = "<object width=\"425\" height=\"350\"><param name=\"movie\" value=\"http://www.youtube.com/v/
second:
code:
\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/
third:
code:
\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed></object>";
}
</Script>
<BODY onload=''>
<div id='vid' align='center'>
</div>
</BODY>
</HTML>
now when you find out the id for whichever video you want to veiw, store it in a variable.
finally write the variables in this order to your file
var1, id, var2, id, var3
that is write NOT append
then you have a .html that you can open
that is the easiest way i can think of