I needed some help placing a series of png images on one web page. Someone threw this cript my way but it doesn't seem to work. All it displays is seven black boxes with a red x in each. Any help would be appreciated as I have absolutely no java skills whatsoever.
#!bin/sh
parent="/opt/apache_1.3.26/htdocs/blah/blah/*png"
echo "
<html>
<head>
<title>My Image page</title>
<script>
function grabImage(name) {
var newwin;
newwin =window.open(\"\",\"Image window\", height=400, width=200);
newwin.document.writeln('<html><body align=center>');
newwin.document.writeln('<image src=\"+ name +\"></image>');
newwin.document.writeln('<br><form name=closer>');
newwin.document.writeln('<input type=button value=Close onClick=window.close()></form>');
newwin.document.writeln('</body></html>');
}
</script>
</head>
<body align=left>
<table align=left border=2 bgcolor=black bordercolor=white <caption>My Images</caption>>
<tr>"
i=1
for all in `ls $parent`
do
i=`expr $i + 1`
echo "<td rowspan=15 align=center><br><br>
<form name=\"$i\">
<input type=image src=$all name=\"$i\" onClick=grabImage($all) height=80 width=50>
</form>
<br><br></td>"
done
echo "
</tr></table></body></html>
"
#!bin/sh
parent="/opt/apache_1.3.26/htdocs/blah/blah/*png"
echo "
<html>
<head>
<title>My Image page</title>
<script>
function grabImage(name) {
var newwin;
newwin =window.open(\"\",\"Image window\", height=400, width=200);
newwin.document.writeln('<html><body align=center>');
newwin.document.writeln('<image src=\"+ name +\"></image>');
newwin.document.writeln('<br><form name=closer>');
newwin.document.writeln('<input type=button value=Close onClick=window.close()></form>');
newwin.document.writeln('</body></html>');
}
</script>
</head>
<body align=left>
<table align=left border=2 bgcolor=black bordercolor=white <caption>My Images</caption>>
<tr>"
i=1
for all in `ls $parent`
do
i=`expr $i + 1`
echo "<td rowspan=15 align=center><br><br>
<form name=\"$i\">
<input type=image src=$all name=\"$i\" onClick=grabImage($all) height=80 width=50>
</form>
<br><br></td>"
done
echo "
</tr></table></body></html>
"