Two javascript questions

  ade.h 19:54 20 Sep 06

I'm making a gallery need to launch a pop-up window from a group of links on a page (15 in all). Everything is done - gallery html pages, javascript code, etc. - but how do I get the JS code to respond to more than one link? Obviously, they can't use the same ID, but I can't find any info about getting JS to respond classes. There are other links on the page which must not be affected by the JS, so they need to be differentiated in some way.

I would also like to know whether it is possible to change the behaviour of a link based on whether the page is open in the browser itself or in a pop-up window. I have a link that takes visitors back to the thumnails page for use when JS is blocked and the page opens in the browser. I would like the same link to be able to close the pop-up, which would avoid confusion for visitors.

click here for the site (and ignore the duplicated thumbs; just waiting for the last few photos!)

  ade.h 15:17 22 Sep 06

No JS experts then?

Well, not to worry. I've reworked it to open the gallery in the existing window, without any JS. In a way, I am happier with that from an accessibility viewpoint.

This thread is now locked and can not be replied to.

Intel Coffee Lake 8th-gen Core processors release date rumours

1995-2015: How technology has changed the world in 20 years

Framestore’s haunting post-WWII title sequence for new BBC series SS-GB

Best iPhone games 2017 | Best iPad games 2017: 162 fantastic iOS games that you need to play right…