If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Mar 2009
    Member #
    Hi.I,m trying to make this work for many hours but nothing. I have an HTML with images that have empty src (src=""). I use javascript to put the src of each img. The next thing I want to do is click on an img and open a new window which also has an img with empty src and pass the image's src I just clicked. I don't know if the following is important : the images are inside a table and they're use as anchors.
    <td class="boxes"><a href=""><img id="0" src=""></a></td>
    <td class="boxes"><a href=""><img id="1" src=""></a></td>
    <td class="boxes"><a href=""><img id="2" src=""></a></td></tr>
    <td class="boxes"><a href=""><img id="3" src=""></a></td>
    My js file is:
    window.onload = choosePhoto;
    var myImages = new Array("frames_029.jpg","frames_050.jpg","frames_04 0.jpg","frames_055.jpg");
    var numberOfPhotos = myImages.length;
    var imgLoad;
    var newWindow;
    function choosePhoto() {
    for (var i =0; i < numberOfPhotos; i++) {
    document.getElementById(i).src = myImages[i];
    for (var j =0; j < numberOfPhotos; j++) {
    document.getElementById(j).onclick = showDetails;

    function showDetails() {
    imgLoad =;
    newWindow ="shop1.html", "frameDetails");
    newImage = newWindow.document.images["im1"];
    newImage.src = myImages[imgLoad];

    In IE the img shows until I allow blocked content, which then disapears.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 01:23 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: