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

E

Erik

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
 
L

Lasse Reichstein Nielsen

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,height=300,resizable=yes");
}

for (var i=0;i<document.links.length;i++) {
var link = document.links;
if ( ... link is a thumbnail link ... ) {
link.onclick = click;
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top