By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
st*************@hotmail.com (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 - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.