Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > possible script?

possible script?
Thread Tools
Junior Member
Join Date: Dec 2003
Location: New Jersey
Status: Offline
Reply With Quote
Feb 2, 2004, 03:37 PM
 
Does anyone know how complicated it would be create a javascript (or something similar) that would click on a button every 10 mins on this website that I'm registered on and report to me (via email?) if there are any changes to the website?

Is this possible and how complicated would it be? I know java and I'm learning PHP.
MacBook 2.4 GHz
Mac OS X 10.5.8
     
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
Feb 2, 2004, 06:06 PM
 
This seems like something that is generally known as a 'security issue'. In order to do it you could have the page inside a frame (or iframe) and have a parent page tell the button you want to click every 10 minutes. However, to do it with javascript, the page you are interacting with (the one inside the frame) would need to be on the same domain i.e. not an external page).

So really, you couldn't do it - as far as i know. I'm not even sure if you could do it with XUL or what-have-you.

Why would you want to do this anyway? Isn't this the sort of thing that spammers do? Anyway - I may be wrong, but I think this is a security thing.

However - reading your post again, it seems your just wanting to see if there are any changes to a web site every ten minutes. Is this right? Subscribing to an RSS feed of the site if it si possible would tell you when anything changes. I don't know. I could show you how to check if things change and send emails using javascript - but only for sites you own....

BTW, java and javascript are completely independent things and not really related. You may know that, but I got the impression from your post that you thought they were one and the same thing.
     
Mac Elite
Join Date: Feb 2000
Location: Nashua NH, USA
Status: Offline
Reply With Quote
Feb 2, 2004, 06:40 PM
 
How about write a jave app to submit the post event that the button sends, then compare the returned page to the previous one.
     
Junior Member
Join Date: Dec 2003
Location: New Jersey
Status: Offline
Reply With Quote
Feb 2, 2004, 07:28 PM
 
Ok, thanks for the tips so far. Well, this is for a rather benign purpose--I'm trying to get substitute-teaching assignments that seem to be getting snatched up as soon as they are posted. So if I could just leave my email open, for example, I would be notified as soon as a new assignment is posted.

And so this *is* a matter of a webpage's content changing, except it is content that exists on a page that I have to log into and one that I must check for updates by pushing a button every 10 minutes.

Thanks again.
MacBook 2.4 GHz
Mac OS X 10.5.8
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Feb 3, 2004, 05:39 AM
 
Blaze has the right idea. Forget using a browser. A little shell script can do this pretty easily using curl and diff.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:55 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2