• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Detecting Data Change in JS

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My current project is something to track print usage. After logging into the printer's web interface and looking at the logs I realized that it was a rolling log with a fixed number or rows. Therefore, once it is full the bottom element falls off and one is added to the top something like a queue. While looking at the source for the page however, I noticed that the actual data was store in the JScript source instead of being recorded. I have made the line I'm talking about bold down below.

Basically what I want to do is, as soon as the online log is updated I want to be able to pull that info from the page and save it to another file on my hard drive. How can I go about automating this so that it will watch the page and automatically pull the information?

I have added the part of the .html containing the appropriate script.

Thanks





 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please UseCodeTags.
 
Adam Nottingham
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah I apologize. Thanks.

The applicable line that was in bold is now on line 28.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why don't you just use a client application to fetch the url and read the file? Simple reg exp can grab it, rip it apart, and you can save it.

Seems pretty weird you do not have a log on the server you can tail in the first place.

Eric

 
reply
    Bookmark Topic Watch Topic
  • New Topic