File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Detecting Data Change in JS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Detecting Data Change in JS" Watch "Detecting Data Change in JS" New topic
Author

Detecting Data Change in JS

Adam Nottingham
Greenhorn

Joined: Mar 04, 2010
Posts: 6
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





Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Please UseCodeTags.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Adam Nottingham
Greenhorn

Joined: Mar 04, 2010
Posts: 6
Ah I apologize. Thanks.

The applicable line that was in bold is now on line 28.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Detecting Data Change in JS