I am trying to use javascripts to open windows with images, but I am finding it a little difficult. I have two thumbnail images and below them I have a "click here for larger image". However, I cannot get my javascripts to work. I used the Opening a New Window script which worked fine on one image, but not the second image. I then used the Loading Different Contents into a Window script, but I just cannot make this work. I got the script from the Negrino and Smith book and I have found that their scripts are really difficult to follow.
Their script is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>Book Info</TITLE>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!-- Hide script from old browsers
function newWindow(bookgif) {
bookWindow = window.open(bookgif, "bookWin", "width=140,height=160")
bookWindow.focus()
}
// End hiding script from old browsers -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="WHITE">
<H1>Our other Peachpit books</H1>
<H3>Click on the name to see a picture of the cover<BR><BR>
<A HREF="javascript:newWindow('java-sm.gif')">Java for the World Wide Web: Visual QuickStart Guide</A><BR><BR>
<A HREF="javascript:newWindow('q00-sm.gif')">Quicken 2000 for Windows: Visual QuickStart Guide</A><BR><BR>
<A HREF="javascript:newWindow('q01-sm.gif')">Quicken 2001 for Macintosh: Visual QuickStart Guide</A></H3>
</BODY>
</HTML>
I did not understand their bookgif explanation and I am getting thoroughly confused. Does anyone know how to overcome this?
Much appreciated.
I know this script works but I do not know what I need to substitute in code to make mine work. I do not understand the (bookgif) part of the code. My larger images are called RSIF1.jpg and RSIS1.jpg. Where do these go in the code to make it work?
replace the small image name with the big reference name.....if you use the small name of course it will open that small image. If you use the big name then it will open the big image.....
Bookmarks