EPrints Technical Mailing List Archive
Message: #03382
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Script to open a.ep_document_link in pop-up
- To: "'eprints-tech@ecs.soton.ac.uk'" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: Script to open a.ep_document_link in pop-up
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Tue, 12 Aug 2014 12:59:58 +0100
Hi Jacob, From the snippet of Prototype below, it looks like you’re defining a function ‘new_window_links’, but never actually calling it? Does this work (anonymous function): document.observe("dom:loaded", function() { links = $$("a.ep_document_link"); links.each(function(link){ link.observe("click", function(event){ window.open(link.href); event.stop(); }); }); }); or this (same named function, specifically called): document.observe("dom:loaded", function() { function new_window_links(){ links = $$("a.ep_document_link"); links.each(function(link){ link.observe("click", function(event){ window.open(link.href); event.stop(); }); }); } new_window_links(); }); I haven’t tested either! Cheers, John From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Jacob Wenzel Hi guys! -- Med venlig hilsen/Best regards JACOB WENZEL ENERGIAKADEMIET |
- References:
- [EP-tech] Script to open a.ep_document_link in pop-up
- From: Jacob Wenzel <jw@energiakademiet.dk>
- [EP-tech] Script to open a.ep_document_link in pop-up
- Prev by Date: [EP-tech] Script to open a.ep_document_link in pop-up
- Next by Date: [EP-tech] Re: Conversion of images, videos into preview/thumbnail versions
- Previous by thread: [EP-tech] Script to open a.ep_document_link in pop-up
- Next by thread: [EP-tech] Re: Script to open a.ep_document_link in pop-up
- Index(es):