| | |
Ajax replacement for auto-updating iFrame
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I'm looking to replace an auto-updating iFrame with some cooler, and more accurate ajax code. And first off I'll say that I believe ajax is the right way to approach this, but I'm open to suggestions, too. I'm not really much of a javascript/ajax programmer, hence I'm hoping for a little guidance here. Being an MCSD, I do understand and can read code and pseudo-code.
The website where this is needed is an internet radio station. The auto-updating iFrame shows what song is currently playing. It's best if you just see it, so please feel free to visit Girls Rock Radio and notice the "Now Playing" section of each page at the site on the right side of the page, below the title graphic and nav bar.
The iFrame displays a page that auto-refreshes every 90 seconds. That works out pretty well, and it seems to update frequently enough to make it seem that it's keeping pretty constant track with the actual song change, even though it's really not.
Behind the scenes, the radio station automation software is updating a file on the web server precisely when the song changes. I can control what information goes into that file, like artist, song title, album, year, genre, filespec to the album art, etc... Pretty much anything that's in the database about that song. What I may NOT be able to enter into that file is something outside of the database - the time the song just started playing, for instance - which would be valuable to know in this situation. But I do have the date/time the file was updated from the servers file system, so I'm no worse for the wear, I guess.
Song length is in the database, so some math based on file date/time and song length should be able to produce the next update file read.
Can anyone help me with some ideas on how to handle an auto-updating ajax replacement for the existing auto-updating iFrame?
Thanks!
The website where this is needed is an internet radio station. The auto-updating iFrame shows what song is currently playing. It's best if you just see it, so please feel free to visit Girls Rock Radio and notice the "Now Playing" section of each page at the site on the right side of the page, below the title graphic and nav bar.
The iFrame displays a page that auto-refreshes every 90 seconds. That works out pretty well, and it seems to update frequently enough to make it seem that it's keeping pretty constant track with the actual song change, even though it's really not.
Behind the scenes, the radio station automation software is updating a file on the web server precisely when the song changes. I can control what information goes into that file, like artist, song title, album, year, genre, filespec to the album art, etc... Pretty much anything that's in the database about that song. What I may NOT be able to enter into that file is something outside of the database - the time the song just started playing, for instance - which would be valuable to know in this situation. But I do have the date/time the file was updated from the servers file system, so I'm no worse for the wear, I guess.
Song length is in the database, so some math based on file date/time and song length should be able to produce the next update file read.
Can anyone help me with some ideas on how to handle an auto-updating ajax replacement for the existing auto-updating iFrame?
Thanks!
Girls Rock Radio - Playing the most awesome contemporary Pop, Rock, & Alternative music from today's All-Girl and Girl-Fronted bands! TUNE IN TODAY !! How about right now?
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: rgb function with variable parameters?
- Next Thread: Images do not coincide w/ text?!
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxexample ajaxjspservlets array autoplay blackjack browser captcha captchaformproblem cart child close codes date debugger decimal dependent design developer disablefirebug dom element embed engine enter events ext file firefox flash focus form forms frameworks game gears getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe java javascript javascripthelp2020 javascripts jquery jsp jump libcurl listbox maps marquee masterpage math media menu onerror onmouseoutdivproblem onmouseover onreadystatechange parameters paypal pdf php player position post programming prototype rated redirect safari scale scriptlets scroll search security size software solutions sources star starrating stretch synchronous toggle tweet unicode variables web webkit webservice window \n





