dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: Loading Different Contents into a Window

  1. #1
    Join Date
    Jun 2005
    Posts
    3

    Unhappy Loading Different Contents into a Window

    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.

  2. #2
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    that code you posted works.....

  3. #3
    Join Date
    Jun 2005
    Posts
    3

    Loading Different Contents into a Window

    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?

  4. #4
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    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.....

  5. #5
    Join Date
    Jun 2005
    Posts
    3

    Smile Loading Different Contents into a Window

    Thanks for your help - all sorted.
    Cheers.
    Last edited by korky1; 06-16-2005 at 06:33 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles