Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Location
    Ontario, Canada
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dynamically loading text...

    OK, I've seen this done on other sites before, but I'm not sure how it works.

    Let's say that I'm running a site and I want real time statistics to be displayed on my web page, but I don't want my users to have to refresh the page to see the updated content.. I'd like it to automatically update. (Right before their eyes!)

    Does anyone have any idea how I would accomplish this?

    Use a simple text file for example... let's say that I have a program that is always adding stuff to the text file... how would I grab the new information from the text file when it becomes available?

    Thanks

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    I think you want JavaScript Remote Scripting. Have a look at <http://www.ashleyit.com/rs/>.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    Regular Coder
    Join Date
    Jul 2003
    Location
    Ontario, Canada
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Not sure if that's what I'm looking for - I'm looking for more of an example of how to do this.... if someone has done it before, it'd be great to know how you accomplished this...

    Thanks

  • #4
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Well, you can use a file reader of the type I have here: <Importing file contents as JS string>

    Note that this only works in ie5.5+w and moz.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •