473,387 Members | 1,766 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,387 software developers and data experts.

Playing the fetched urls one by one with some time gap

Hi All,

Earlier I haved posted the issue for fetching the base URLs from the xml file and got some valubale help from this Forum.

With the given inputs ... i was able to code to fetch all the base urls from a XML file, now we like to display the fetched base URLs one by one with some time gap between the corresponding URLs present, in the browser . This is something similar to replay of activities done by a user

P.S : We are working on Mozilla extension , with XUL, Javascript and XML.

Need your help in this regard...

Thnx...
Jul 2 '07 #1
5 1188
acoder
16,027 Expert Mod 8TB
You can use setInterval for this. Will these URLs be 'played' in an iframe?
Jul 2 '07 #2
Hi,

Say suppose, when i click on a button say 'Playback' in the frontend ... it should open up the browser and urls that are been fetched from XML file should (come or )play one by one in the same browser window ... with a time gap ..

Thnx
Jul 2 '07 #3
acoder
16,027 Expert Mod 8TB
So you're opening a new browser window for the URLs? Well, in that case, it should be easy enough.

Assuming you've parsed the XML and have the urls, you can use seInterval to call a function which updates the URL of the opened window every x seconds,e.g.:
Expand|Select|Wrap|Line Numbers
  1. var urls = // e.g. in an array
  2. var urlindex = 0;
  3. var newwin;
  4. var intrvl;
  5. function updateURL() {
  6.  if (urlindex==0) newwin = window.open(urls[urlindex],...);
  7.  else newwin.location.href=urls[urlindex];
  8.  urlindex++;
  9.  if (urlindex==urls.length) clearInterval(intrvl);
  10. }
  11. intrvl = setInterval("updateURL()",x);
Jul 2 '07 #4
Hi Mr.acoder...

This was very helpful to me ... and done the coding as u guided and was successful in it ...

Thnks a lot...
Jul 3 '07 #5
acoder
16,027 Expert Mod 8TB
No problem, you're most welcome.
Jul 3 '07 #6

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

Similar topics

26
by: Robert Baer | last post by:
The following passes the test as valid, and the mouseover for the six indicated areas also work. I need various areas to link to another page, including the six mentioned. However either the MAP...
10
by: jflash | last post by:
Hello all, I feel dumb having to ask this question in the first place, but I just can not figure it out. I am wanting to set my site up using dynamic urls (I'm assuming that's what they're...
1
by: preejith | last post by:
Error Code : 1329, No data - zero rows fetched, selected, or processed. MYSQL I am getting the following error while running a stored procedure in mysql5.0 Error Code : 1329 No data - zero rows...
1
by: gubbachchi | last post by:
Hi, For my project I have a "add" button, upon clicking it, it will take the user to next page where there will be a text box and list of data displayed below it which is fetched from mysql...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.