Skip to content

This page contains some usefull hints how you can improve your page to maintain functionality even with browsers that have Javascript disabled or don't even have the capability to interpret JavaScript.

Adding Image popups

Often, when you have thumbnails of images, you want to pop up the full size pictures in a new window. This situation also arises whenever you want to pop up a document/webpage/image in another Window. There are many bad and one good method to achieve this :

function popup(url){window.popup(url)}; <!-- One True Popup Method -->
<a href="document" onClick="return popup('document')">


<!-- Another example -->
<a href="images/whatever.jpg" onClick="return popup('view.php?pic=whatever.jpg')">
  <img src="images/whatever_thumb.jpg">
</a>

<!-- Another example always creating a new window -->
<a href="images/whatever.jpg" target="_blank" onClick="return popup('view.php?pic=whatever.jpg')">
  <img src="images/whatever_thumb.jpg">
</a>