Home › Forums › JavaScript › How to alert if there's some changes in values/data?
- This topic is empty.
-
AuthorPosts
-
August 18, 2014 at 11:19 pm #179728web_editorParticipant
How to alert the user if there’s a some changes in data/values? Example is the home address. And if detected there’s some changes, it will call or popup the html file where the changes are save. I have two codes, one for scanning the values. And second, open a new tab for Google Map. I want to do this in pure/native JavaScript. I’m not really a programmer, please help me. Thanks
Note: I don’t have privilege to edit/customize the entire html
August 19, 2014 at 2:12 am #179743Paulie_DMemberI’m not really a programmer, please help me.
It’s not clear what you are trying to do but you really shouldn’t be tinkering with something you don’t understand.
We can’t really comment with any great degree of confidence as it’s unlikely we’ll have enough information to ensure that what we might suggest won’t break something else on your site.
For this sort of thing…you should really think about hiring someone.
August 19, 2014 at 2:31 am #179773web_editorParticipantI mean I’m not a totally a programmer. I’m just a beginner in this field. This question is related to this one . Let’s say contact address (which is already mention in my code) did some changes, the user will get an alert box that saying “There’s a new address blah blah blah”
August 19, 2014 at 2:38 am #179775Paulie_DMemberAs I said…
We can’t really comment with any great degree of confidence as it’s unlikely we’ll have enough information to ensure that what we might suggest won’t break something else on your site.
For this sort of thing…you should really think about hiring someone.
August 19, 2014 at 5:12 am #179803Paulie_DMemberSounds like it needs a function to compare strings and if different show an alert asking if the user wants to confirm.
Is so, proceed with the ‘save’, presumably carry out some form of validation and go from there.
There’s some pretty extensive JS in the other thread – https://css-tricks.com/forums/topic/how-to-get-and-display-the-values-in-html-page/#post-179771
Not sure where it came from (or who wrote) it but there it is.
Perhaps it could be adapted…..
August 19, 2014 at 6:56 pm #179954web_editorParticipantSome changes in the values made by other user. There’s a three pages, first page (html page) where the changes made, second (html page) where the changes save/store and the third page contain the original values and it will alert if there’s some changes/update from the third page (wherein the changed values store). Here’s my JS to scan and get the values and display to the search box of google maps itself
August 21, 2014 at 8:28 pm #180202web_editorParticipantBut I don’t have database or server. i just store the data into fileserver. Hmm. But now I change my plan.. Now, how can I display a values from UAT to html page created?
August 21, 2014 at 8:51 pm #180204nixnerdParticipantAll this does not sound like the right approach. I gotta agree with @nkrisc. How hard is it to install SQLite?
August 21, 2014 at 10:00 pm #180205__ParticipantI don’t have privilege to edit/customize the entire html
JS to scan and get the values and display
how can I display a values from UAT to html page created?
You mention “UAT” in several of your threads. What does this refer to? are you talking about uat.edu? are you trying to scrape information from this site? if so, do you have permission from UAT to do this?
Unauthorized copying, downloading, uploading, sharing, installing, or distributing of copyrighted material for which UAT or the end user does not have express permission to use or does not fall within Fair Use guidelines is strictly prohibited.
— http://www.uat.edu/about_uat/copyright_notice.aspxIf this is what you’re trying to do, note that it is almost always easier to get permission, because the information you want is usually available in a more convenient format. There might be APIs in place that allow you to access the data you need directly, instead of trying to parse it from the HTML (which is notoriously difficult, with lots of “edge” cases to account for, and is ultimately unreliable).
August 21, 2014 at 10:37 pm #180207nixnerdParticipantI had no idea what UAT was either… assumed it was something that wasn’t totally relevant to the question. I also assumed OP had full control over the site he/she was trying to monitor changes to. Had no idea this was about scraping.
Assuming that you are talking about the school… and assuming they don’t have an API… and assuming you get permission to scrape their content… and assuming you can properly parse what you scrape… you can write a cron scrip to wget or curl the content every hour or so, then write a script to compare the md5 checksum.
This is such a bad option though. There is surely another way to get the info you want.
It’s worth noting that this is EXACTLY the same thing that ruined Aaron Swartz’s life… scraping content from an institution of higher education. Now he’s dead.
August 21, 2014 at 11:13 pm #180209__ParticipantTo be clear, I am not sure what is “going on” —not even sure we’re really talking about scraping— which is why I ask. I’d like to be sure that the OP is aware of any potential complications/liabilities, but I am not making any accusations.
NIX is right, though. Even if everything is totally “above board,” scraping is almost certainly the worst possible solution.
August 22, 2014 at 12:37 am #180214nixnerdParticipantYeah sorry to sound accusatory as well. Didn’t mean to. We’re all just confused.
I like to add potentially relevant info for posterity. We’re curating the web here folks and this is the pantheon :)
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.