EPrints Technical Mailing List Archive
Message: #03381
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] 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] Script to open a.ep_document_link in pop-up
- From: Jacob Wenzel <jw@energiakademiet.dk>
- Date: Tue, 12 Aug 2014 13:34:37 +0200
Hi guys! Im trying to open document links - '<a class="ep_ducument_link" href=""#3366ff">jQuery(document).ready(function($) { jQuery('a.ei_popup').live('click', function(){ newwindow=window.open($(this).attr('href'),'','height=575,width=720'); if (window.focus) {newwindow.focus()} return false; }); }); which does the trick. I am totally new to prototype, but I found this snippet, that is supposed to do the same: 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(); }); }); } }); But it doesn't do anything. I checked the source code, and the code does load fine from 90_local.js. Thanks in advance, help and pointers will be greatly appreciated. Have a nice day! --
Med venlig hilsen/Best regards JACOB WENZEL ENERGIAKADEMIET |
- Prev by Date: [EP-tech] Re: Farewell (?)
- Next by Date: [EP-tech] Re: Script to open a.ep_document_link in pop-up
- Previous by thread: [EP-tech] EPrints utility scripts
- Next by thread: [EP-tech] Re: Script to open a.ep_document_link in pop-up
- Index(es):