Tel
04-21-2003, 11:43 AM
I have a pop up window with an image and a close button, is it possible to have on either side of the close button, a button for << and >> to go to the next image instead of closing the window and selecting the next one.
Thanks in advance.
This is the window code:
<SCRIPT language="JavaScript">
function display_image(form) {
selectionname = form.imagename.options[form.imagename.selectedIndex].text;
selection = form.imagename.options[form.imagename.selectedIndex].value;
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars,resizable,copyhistory=0,width=200,h eight=255");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Screen Capture</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=000000 TEXT=FFFFFF>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" +
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}
</SCRIPT>
<FORM>
<select NAME="imagename" onChange="display_image(this.form)">
<option value="http://worlddvdlinks.co.uk/images/xxx1.jpg" SELECTED>Image 1
<option value="http://worlddvdlinks.co.uk/images/xxx2.jpg">Image 2
<option value="http://worlddvdlinks.co.uk/images/xxx3.jpg">Image 3
<option value="http://worlddvdlinks.co.uk/images/xxx4.jpg">Image 4
</select>
</FORM>
Thanks in advance.
This is the window code:
<SCRIPT language="JavaScript">
function display_image(form) {
selectionname = form.imagename.options[form.imagename.selectedIndex].text;
selection = form.imagename.options[form.imagename.selectedIndex].value;
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars,resizable,copyhistory=0,width=200,h eight=255");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Screen Capture</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=000000 TEXT=FFFFFF>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" +
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}
</SCRIPT>
<FORM>
<select NAME="imagename" onChange="display_image(this.form)">
<option value="http://worlddvdlinks.co.uk/images/xxx1.jpg" SELECTED>Image 1
<option value="http://worlddvdlinks.co.uk/images/xxx2.jpg">Image 2
<option value="http://worlddvdlinks.co.uk/images/xxx3.jpg">Image 3
<option value="http://worlddvdlinks.co.uk/images/xxx4.jpg">Image 4
</select>
</FORM>