• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Easy solution? Work smarter not harder...

Meractik

Golden Member
I have a website at work which is internal and accessed for ticketing.

Its setup rather silly in that you have to refresh the URL constantly to see the queue. I am curious if there is a way to seamlessly write a batch file or some other sort of script which when given the URL will scour it for new content on the page and if there is new content will display a windows dialog "OK" box which pop's up as the current active window above all other open windows to alert the user of a new ticket?

I am not a super savy programmer or anything but that is why I am posting to get some advice as to whether I can make this possible without re-writing anything but instead just supplement what is already given, I do not have access to change the page I only want to implement some sort of timed interval to automatically refresh and update me accordingly?

I thought maybe perhaps some sort of RSS type script or feed of sorts would work? There has to be an easier way than simply loading IE 9 (which is the required browser btw) and hitting refresh on the website.

The URL of the website in question never changes, it is only the content that is updated on the page....

Any help or assistance you could provide is greatly appreciated, I will be popping in to check on the thread as often as I can, but due to a busy schedule I probably won't be able to respond immediately.
 
One option would be to create a new site (html page), and load your ticketing site within a frame of your new site.

In the parent site set a javascript timer to reload the frame periodically (in this case 20 seconds).


window.setInterval(function(){ document.getElementById("frameid").location.reload(true);},20000);

If you want to do the alert when content changes, you can compare the HTML DOM before and after the refresh to see if it changed and then alert.
 
There are plugin for the Browser that will auto refresh the webpage for you.

Wouldn't work for me, I need to not manipulate the system but instead only work with what is already available. Plus I want the functionality of a popup not just auto refresh.
 
One option would be to create a new site (html page), and load your ticketing site within a frame of your new site.

In the parent site set a javascript timer to reload the frame periodically (in this case 20 seconds).


window.setInterval(function(){ document.getElementById("frameid").location.reload(true);},20000);

If you want to do the alert when content changes, you can compare the HTML DOM before and after the refresh to see if it changed and then alert.


This sounds promising.... the only part I do not quite understand is the comparison of HTML DOM do you have any URL's for reference of how to do this (more specifically in the way that I would need too...)? I think the loading the page in a frame and using javascript timer to refresh would work great... Thanks for the reply!
 
Last edited:
Chrome plugins can inject javascrict into pages, so its perfectly possible to write a simple plugin (mostly meta data anyway) and on that page/website to inject the refresh javascript above.
 
Chrome plugins can inject javascrict into pages, so its perfectly possible to write a simple plugin (mostly meta data anyway) and on that page/website to inject the refresh javascript above.

I do not wish to inject javascript or code into anything that is already pre-existing. I want to simply take what is provided and build around it.

Plus I need to use IE 9, so chrome is out of the question.
 
I do not wish to inject javascript or code into anything that is already pre-existing. I want to simply take what is provided and build around it.

Plus I need to use IE 9, so chrome is out of the question.

I searched for irony in this thread and it came up a dozen times.

Just tell your boss and let the developers figure it out. Or if you insist on getting the page to reload on your browser only, then the only available methods would be the ones others have mentioned... just don't come back later and ask to stop a page from auto-refreshing while you're typing in a message.
 
This sounds promising.... the only part I do not quite understand is the comparison of HTML DOM do you have any URL's for reference of how to do this (more specifically in the way that I would need too...)? I think the loading the page in a frame and using javascript timer to refresh would work great... Thanks for the reply!

Libraries like jQuery make it pretty easy to do this sort of thing.

It depends on how your work's site is set up, but you would probably be looking for items in a list. You would iterate through the list, save its current state into a variable, then when your frame refreshes, you would iterate through the list again and see what exactly has changed (or simply whether or not anything changed).
 
I do not wish to inject javascript or code into anything that is already pre-existing. I want to simply take what is provided and build around it.

Plus I need to use IE 9, so chrome is out of the question.

That is what you are doing when you inject the javascript. Javascript runs on your local browser, by injecting it you aren't changing anything on the server. I could inject javascript for anandtech if I liked and it wouldn't change any of the data that other see here.

Also, why is it IE9 only? Is there a policy in place that forces you to use IE and not some better browser?
 
That is what you are doing when you inject the javascript. Javascript runs on your local browser, by injecting it you aren't changing anything on the server. I could inject javascript for anandtech if I liked and it wouldn't change any of the data that other see here.

Also, why is it IE9 only? Is there a policy in place that forces you to use IE and not some better browser?


Yes. Regrettably so, policy is for IE9 only.

Thanks for the tid-bit about injections - I always thought that was more of a term used to state you where introducing something new into an environment where it is not really wanted, which is frowned upon. But as long as the data remains unaltered, its all good that I can develop something around it that doesn't change its state only wraps it or accesses it read-only.
 
Libraries like jQuery make it pretty easy to do this sort of thing.

It depends on how your work's site is set up, but you would probably be looking for items in a list. You would iterate through the list, save its current state into a variable, then when your frame refreshes, you would iterate through the list again and see what exactly has changed (or simply whether or not anything changed).

I would prefer to give a "snapshot" of the url when the ticket queue is completely empty, then cause a active window pop-up dialog to display when its anything other then empty, this I believe would cause the initial variable size to be nice and small and aid in utilization of system resources......
 
Yes. Regrettably so, policy is for IE9 only.

Thanks for the tid-bit about injections - I always thought that was more of a term used to state you where introducing something new into an environment where it is not really wanted, which is frowned upon. But as long as the data remains unaltered, its all good that I can develop something around it that doesn't change its state only wraps it or accesses it read-only.

Hummm, ok. Well for IE there is Trixie which does javascript injection. However, I doubt you will be allowed to install new software/plugins like that.

Your best bet will be the path the douglasb is leading you down (keeping the page in a frame and monitoring the frame.
 
This sounds promising.... the only part I do not quite understand is the comparison of HTML DOM do you have any URL's for reference of how to do this (more specifically in the way that I would need too...)? I think the loading the page in a frame and using javascript timer to refresh would work great... Thanks for the reply!

There are many ways to do it. One way would be to find the DOM element that contains the list and store the inner HTML for it. Hopefully the ticketing program uses ID attributes. If not you may need to loop through the DOM and find the tag.


//get the frame
var frame = document.getElementById("frameid");

//get the HTML of the list element
var currentHTML = frame.window.document.getElementById("listid").innerHTML;

document.getElementById("frameid").location.reload (true);

// need to check the html after the page loads
frame.window.onload = function(){
var newHTML = frame.window.document.getElementById("listid").innerHTML;

if(currentHTML != newHTML) alert("Different");
}
 
Back
Top