Hello, i am all new to this kind of stuff and i didnt find any topic yet about it because i do not really know how to call this problem. So if there are any solutions yet i am sorry for opening a new topic.
I want a dropdown navigation, that read its content out of an array.
best would be if the array could read its content out of a .txt file but i know that this is kinda impossible via javascript.
But there is gonna be a special part about the dropdown. Above the dropdown there is a embeded youtube video.
This is a randomly shown youtube video, by letting php generate a random number, picking a video-link out of the array-file and putting the link into this embeded code.
NOW^^ if the user chooses a link in the dropdown it should change the above video code by putting in not the random number but the choosed one.
I hope you understood what i was trying to ask
Thats what i got so far...its all PHP i know, but i do not know how to realize it with javascript, thats why i ask it here.
Sry for my bad english i am from germanyCode:<?php $video_array = file('vid.txt'); $zahl_array = file('zahl.txt'); $anzahl = count($video_array); // random zahl für alle arrays gleich $num = rand(0, count($video_array) - 1); $video = $video_array[$num]; $zahl = $zahl_array[$num]; //Trimmen $zahl = trim($zahl); $video = trim($video); ?> <table border="0" width="100%"> <tr> <td width="100%" align="center" colspan="1"> <--In here should be either the random video which is standard, or the choosed video by the user--> <object width="540" height="345"><param name="movie" value="http://www.youtube.com/v/<?echo $video;?>"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/<?echo $video;?>" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="205" height="150"></embed></object><br><b>Playing video nr. <? echo $zahl; ?> of <? echo $anzahl; ?></b> </td> </tr> <tr> <td width="50%" align="center">Choose a video <FORM name="drop_list" method="POST" > <SELECT NAME="Vide"> <Option value="" >Video Liste</option> <--In here should be the generated Options out of the arrayfile--> </SELECT> </form> </td> </tr> </table>


Reply With Quote
Bookmarks