>> >Please, I have a question about playlist
>> >
[quoted text clipped - 58 lines]
>7 clip7.wmv ..... 12:00:00 ........ 00:59:59........... title7
>8 clip8.wmv...... 13:00:00 ........ 00:59:59........... title8
OK so I think from reading your table, that the data to show depends
on the time at the users computer ?
So that if the local time is (say) 10am in their timezone, you want to
load the list of clips from 10:00:00 up to 13:00:00
That is not specifically media player dependent then, it requires
simple javascript to decide which records to show, using the
javascript Date() object, for example
<script language="javascript1.2" type="text/javascript">
today = new Date()
recordsToShow = today.getUTCHours() + today.getUTCMinutes() +
today.getUTCSeconds();;
</script>
That will actually create a string recordsToShow = '215400'
Now, with reference to your XML, omit the colons ( : ) in the time
values. Those values are now sequential numbers, and are easy to
compare to the date, using [XMLdatevalue] > recordsToShow, so you can
easily compare 110000 < 215400, but 230000 > 215400
See this page for the available methods (preference : use UTC methods
which aren't local timezone dependent)
http://www.w3schools.com/jsref/jsref_obj_date.asp
>Now I create an XML file (with dynamic data from mysql table) with php (I
>know to
[quoted text clipped - 10 lines]
>
>ecc ...
I would seriously rewrite that to make data access simpler, either
using jQuery or Prototype, or using XSL. Anyway I'd make the nodes :
<videos>
<video start="070000">
<length>000959</length>
<title>title1</title>
</video>
.
.
.
</videos>
Now you can access all video nodes easily which have start >= 070000
It means you don't have to iterate every node, and remember in your
script if you are at or have passed the 070000 time node. In XPath for
example, you would have a query of
/videos/video[@start >e; 070000]
That would select the video node, then (or instead) you could use
/videos/video[@start >e; 070000]/length
/videos/video[@start >e; 070000]/title
to select the actual information you want to display in the table.
This page is excellent for viewing the jQuery methods,
http://visualjquery.com/1.1.2.html and you should check the section
under DOM -> Traversing -> Find() method, which can be used to get all
matching (XPath) elements in the DOM you load into jQuery.
The complete list of jQuery selectors includes CSS3 and XPath :
http://docs.jquery.com/DOM/Traversing/Selectors although CSS3 is not
much use to you with XML content, the basic XPath above is supported
without needing to do client-side XSLT work.
>Now in my php page I want to write an HTML tabe that show (at 7.00.00 o'
>clock )
[quoted text clipped - 25 lines]
>I searched for prototype and Web 2 but I diden't find for my problem
>Regards
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Alberto - 17 Aug 2007 02:22 GMT
Thank Neil for your help and your time
I have finded, with your directions, a simple solution whith XMLHttpRequest
and javascript.
Is simple and work well.
Thank again, have good time