Open New Window And Show All Images

[Total: 0    Average: 0/5]

This shows how to have a page open up on a click that has all the images on it.

Body Code:

<img border=1 src="">&nbsp;|&nbsp;
<img border=1 src=""><BR>
<a href="javascript:makeNew()">click me</a>

var _np = null;
function makeNew() {
  var imageName;
  var _page  = "<head></head><body>";
  for (var imageNum=0;imageNum<document.images.length;imageNum++)
      imageName = document.images[imageNum].src;
      _page += "Image #"+(imageNum+1)+" -&gt; ";
      _page += "<img border=1 src='"+imageName+"'><BR>";
  _page += "</body>";
  _np ="","np");;

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *