Modify Pop Up Window

liunx

Guest
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.<br />
<br />
Thanks in advance.<br />
<br />
This is the window code:<br />
<br />
<SCRIPT language="JavaScript"><br />
<br />
function display_image(form) {<br />
selectionname = form.imagename.options[form.imagename.selectedIndex].text;<br />
selection = form.imagename.options[form.imagename.selectedIndex].value;<br />
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars,resizable,copyhistory=0,width=200,h eight=255");<br />
PreView.document.open();<br />
PreView.document.write("<HTML><HEAD>");<br />
PreView.document.write("<TITLE>Screen Capture</TITLE>");<br />
PreView.document.write("</HEAD><BODY BGCOLOR=000000 TEXT=FFFFFF>");<br />
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" +<br />
selectionname + "</FONT></B><HR>");<br />
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +<br />
"SRC='http://www.webdeveloper.com/forum/archive/index.php/" + selection + "'>");<br />
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +<br />
"onClick='window.close()'></FORM>");<br />
PreView.document.write("</CENTER>");<br />
PreView.document.write("</BODY></HTML>");<br />
PreView.document.close();<br />
}<br />
</SCRIPT><br />
<br />
<br />
<FORM><br />
<select NAME="imagename" onChange="display_image(this.form)"><br />
<option value="http://worlddvdlinks.co.uk/images/xxx1.jpg" SELECTED>Image 1<br />
<option value="http://worlddvdlinks.co.uk/images/xxx2.jpg">Image 2<br />
<option value="http://worlddvdlinks.co.uk/images/xxx3.jpg">Image 3<br />
<option value="http://worlddvdlinks.co.uk/images/xxx4.jpg">Image 4<br />
</select><br />
</FORM><!--content-->What you need to do is in the next or previous buttons on click events call a function that should appropriately display the next image or previous one..You can adapt some slide show functionalities,<br />
You want to look at this site for code examples..<br />
<br />
<!-- m --><a class="postlink" href="http://www.dynamicdrive.com">http://www.dynamicdrive.com</a><!-- m --><!--content-->Thanks for the reply. To tell you the truth I don't know what I'm doing, but I'll have a look and give it a go.<br />
<br />
Cheers!<!--content-->
 
Back
Top