Print

Print


Javascript events can be registered only within the context of the rendered web page--not with elements of the browser user interface like the address bar.  It's easy to understand why this is if you think about the potential privacy and security concerns that could result from such functionality being available to websites.

-Alan

Alan Harnum
Web Librarian
Toronto Public Library E-Services
(416) 395-5412
[log in to unmask]

>>> Peter Murray <[log in to unmask]> 29/11/2010 4:03 pm >>>
Whoa -- good question.  I don't think there is a hook in JavaScript that is running within a page to detect whether a user is manipulating the address bar (e.g. selecting it and copying its contents).  Such an alert would be possible in the case of browser plugins, but then the browser would have to have the plug-in.


Peter

On Nov 29, 2010, at 1:49 PM, Ken Irwin wrote:
> 
> Hi all,
> 
> I have just, for the severalth time, just talked to a student who had lost a bunch of work in a common way: he had copied-and-pasted a bunch of database-content URLs on the fairly-reasonable (but, of course, incorrect) assumption that those URLs would get him back to the content later. He happened to be in LexisNexis, but it happens in lots of databases.
> 
> Here's what I'm wondering: is there any tasteful/sane way of using JavaScript to detect when a user clicks into the URL bar and copies/cuts the URL from a page that will do the user no good later? It would, to my mind, be completely civilized for the database provider to generate a little popup window alerting the user to the error of their ways.
> 
> User education would be great, of course, but some sort of built-in alert would be very friendly. 
> 
> What think you all? Would JS or some similar tool be able to achieve this? 
> 
> Ken


-- 
Peter Murray         [log in to unmask]        tel:+1-678-235-2955                 
Assistant Director                                http://dltj.org/about/ 
Lyrasis   --    Great Libraries. Strong Communities. Innovative Answers.
The Disruptive Library Technology Jester                http://dltj.org/ 
Attrib-Noncomm-Share   http://creativecommons.org/licenses/by-nc-sa/2.5/