TheStorey,
Код
<script language="JavaScript">
<!--
function showhideBlocks(val)
{
if (val<=series) document.getElementById('ifr').src = arr[val-1];
}
var start = 1;
function fun()
{
if (start==0) return;
start = 0;
for(i=2; i<=series; ++i)
{
var newSelectOption = document.createElement('option');
newSelectOption.setAttribute('value', i);
textForOption=document.createTextNode("Серия "+i);
newSelectOption.appendChild(textForOption);
document.getElementById('series').appendChild(newSelectOption);
}
}
var arr = ["http://vk.com/video_ext.php?oid=-23431986&id=164111234&hash=5426f8e824644169&hd=1]",
"http://vk.com/video_ext.php?oid=-23431986&id=163701531&hash=94e92a9fb8303ddb&hd=1",
"http://vk.com/video_ext.php?oid=-23431986&id=163696900&hash=61e29a576c45b530&hd=1",];
var series = 3;
-->
</script>
<p></p><center>
<div>
<iframe id="ifr" src="http://vk.com/video_ext.php?oid=-23431986&id=164111234&hash=5426f8e824644169&hd=1" width="607" frameborder="0" height="380">
</iframe>
</div>
Выберите серию для просмотра:
<center>
<select id="series" onchange="showhideBlocks(value)" onclick="fun()">
<option value="1"> Серия 1
</option></select></center></center></center></center></td></tr></tbody></table>
<center><script type="text/javascript">
function hide()
{
for(i=0; i<hide.arguments.length; i++)
{
document.getElementById(hide.arguments[i]).style.display = 'none';
}
}
function show(id)
{
hide('d1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8');
document.getElementById(id).style.display = 'block';
}
</script>