473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Using Javascript to call latest xml file for html display

2
Hi, this is probably fairly straight forward, but I am very new to this so I hope you can help.

I have an html file that reads from an xml data every minute and displays the data. Now I need a way of updating the xml data source file in the html document. The source name takes the file structure 16102006_0045 then 16102006_0046 e.t.c.

i have been told that javascript is the way to do this but can't seem to find any info on it.

here is the struture of the html document

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3.  
  4. <xml id="15102006_1315" src="15102006_1315.xml"></xml>
  5. <meta http-equiv="refresh" content="10;URL=.......ekoner.html">
  6. <table border="1" datasrc="#ekoner">
  7.  
  8. <thead>
  9. <tr><th>Data1</th><th>Data2</th><th>Data3</th><th>Data4</th></tr>
  10. </thead>
  11.  
  12. <tbody>
  13. <tr>
  14. <td><span datafld="Data1"></span></td>
  15. <td><span datafld="Data2"></span></td>
  16. <td><span datafld="Data3"></span></td>
  17. <td><span datafld="Data4"></span></td>
  18. </tr>
  19. </tbody>
  20.  
  21. </table>
  22.  
  23. </body>
  24. </html>
And the xml looks like this

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <dataset>
  3.  <row>
  4. <Data1>1315</Data1>   <Data2>2006-10-11 16:00:00</Data2>   <Data3>Soccer - Fixtures</Data3>   <Data4>Belarus v Slovenia</Data4></row>
  5. </dataset>
  6.  <row>
So that xml document has the name of 15102006_1315.xml and that is referenced in the html document. After 1 minute, a new one is uploaded as 15102006_1516.xml and that now needs to be read in the html document.

Any tips on how to do this best?

Thanks :)
Oct 15 '06 #1
1 5783
acoder
16,027 Expert Mod 8TB
Read how to import XML using JavaScript. To update, call it every minute using setInterval().
May 23 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Froggy_Jo | last post by:
I have a split screen HTML display. In the bottom half, I have a series of file names with hyperlinks. In the top half, I want to display the file selected. However, it seems I can only do this...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
9
by: Charley Kyd | last post by:
I'm a newbie who needs advice about how to use external files of JavaScript code. I spent an hour this afternoon browsing through JavaScript books at the local book store. In about 15 different...
0
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to...
10
by: Simon | last post by:
Hi, Sorry for the cross posting, but I think it applies to both languages. As we all know, JavaScript is client side and php is server side, (the php code is 'allowed' to do stuff on the...
8
by: dbaplusplus | last post by:
I worked on web development using java script many many years, so I am now a newbie to javascript. I have a single html page, which is generated dynamically using some programming language. Web...
8
by: Frank | last post by:
Hi, I am working with VS.NET 2005 Ultimately, I wish to call a JavaScript function from a .js file
2
by: verci | last post by:
Hi guys, sorry if this seems stupid but I'm a newbie, I'm running Windows XP Pro SP2, IE 7, VS2005, ASP.net 2.0 The problem is that I'm trying to display this news scroller made in a Javascript...
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.