Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Is there a global script to open all links on a page in a pop up for a photo album.

Reply
Thread Tools

Is there a global script to open all links on a page in a pop up for a photo album.

 
 
Erik
Guest
Posts: n/a
 
      09-16-2003
Hello,
I have a page with about 100 links in the form of thumb nails that
open a small html page. It took a lot of time to define each link and
I sure do not want to go though that again.

I would like to know if there is a way to make a global script that
will open any link (thumb nail) that I push on that page in a pop up.
Remember each pop up is a small html page and not just a photo.

I got some few answers in my last post but none of them worked.

Thank you so much for you time.

All the best
Erik

www.eriksworld.org

Sweden
 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      09-17-2003
(Erik) writes:

> I have a page with about 100 links in the form of thumb nails that
> open a small html page. It took a lot of time to define each link and
> I sure do not want to go though that again.
>
> I would like to know if there is a way to make a global script that
> will open any link (thumb nail) that I push on that page in a pop up.
> Remember each pop up is a small html page and not just a photo.
>
> I got some few answers in my last post but none of them worked.


How did they fail?

You can add an onclick event handler to all links on the page (or to
some of them):
---
function click() {
window.open(this.href,this.target,"width=400,heigh t=300,resizable=yes");
}

for (var i=0;i<document.links.length;i++) {
var link = document.links[i];
if ( ... link is a thumbnail link ... ) {
link.onclick = click;
}
}
---
/L
--
Lasse Reichstein Nielsen -
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting 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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update to FAQ - Relative URLs for In-page Links and Links to Notes Garrett Smith Javascript 14 05-26-2009 04:50 PM
close all open windows/pop-up at once richakarve@gmail.com ASP .Net 1 04-17-2007 03:40 PM
FWSM/PIX and Dynamic PAT using global IP range vs. global interface vs. global IP Hoffa Cisco 1 10-25-2006 06:50 PM
FWSM/PIX and Dynamic PAT using global IP range vs. global interface vs. global IP Hoffa Cisco 0 10-25-2006 01:04 PM
When I open Internet Explorer, along with my home page a pop page pops up, I have changed home page but that doesnt work Phil Computer Support 7 03-04-2004 12:22 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57