View Full Version : show a part of an xml file in html
queerfm
01-21-2007, 07:11 PM
Hi i was wondering if there is away to show a part of an xml based on the time of the day in +8gmt time in HTML?
Rockonmetal
01-25-2007, 06:13 PM
I think I might have something here
Because I got it
Place this straight into the place where u want it.
<!-- Begin Script -->
<script type="text/javascript">
var d = new Date()
var time = d.getHours()
if (time < 8)
{
document.write("<iframe src='xmlfile.xml' width='100' height='100'></iframe>")
}
else
{
document.write("Other file or something else")
}
</script>
<!-- End of Script -->
<!-- Notes:
if (time < 8) means that if the time is past 8 am any time than the file won't show,
Keep the (')s in, they keep the javascript from going boskot *or crazy*.
Enjoy-->
queerfm
02-03-2007, 03:39 PM
Ok got it working is this script based on the servers time or Perth Western Australia time or the users computer. As i need it if possible to be +8GMT
But i love the script Thanks.
also can i do like every 15 min or does it have to be an hour like we have shows that go for 30min some shows finish at not 100% on the hour can this be done?
queerfm
02-03-2007, 04:03 PM
also can i do like every 15 min or does it have to be an hour like we have shows that go for 30min some shows finish at not 100% on the hour can this be done?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.