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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Erik

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

    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



    Sweden
  • Lasse Reichstein Nielsen

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

    straightduckleg @hotmail.com (Erik) writes:
    [color=blue]
    > 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.[/color]

    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(thi s.href,this.tar get,"width=400, height=300,resi zable=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 - lrn@hotpop.com
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    Working...