Register

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 5 of 5
  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    8
    Member #
    27747
    My website seems to be doing well in Mozilla and Chrome. However, some of the images on the site will only load 1px wide and then stop in IE.

    You can see what I mean:
    http://nicoletnelson.com/gallery1.html

    While in IE, click on one of the thumbnail images on the bottom. The main image loads incorrectly.

    Does anyone know what is happening here?

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    It's this line here, and on a deeper level your function:
    Code:
    var imgTag = "<img src='"+imageName+"' border='0' height='520' width='auto'/>" ;
    Since you've put auto for the width, IE is guessing. That's not a valid value, as far as I know, for that attribute. You're much better off passing them as parameters. Whenever you're dealing with width and height, you should always be as explicit as possible.
    Code:
    function changeIt(imageName,objName, imageWidth, imageHeight, altAttribute)
    {
     var obj = document.getElementById(objName);
     
     var imgTag = "<img src='"+imageName+"' border='0' height='" + imageHeight + "' width='" + imageWidth + "' alt='" + altAttribute + "'/>" ;
     
     obj.innerHTML = imgTag;
     
     return; 
    }
    ...
    Code:
    <a id="one" href="#" onclick="changeIt('pic1projects/gal1-1.jpg','image1', 432, 650, 'Hot Chick With a Really Weird Tongue Drinking Water from a Spray Nozzle When a Bottle or Glass is Probably Somewhere Close By');"><img src="pic1projects/t1-1.jpg"></a> <!-- you'll need to repeat as necessary. -->
    tehshyt likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    May 2011
    Posts
    8
    Member #
    27747
    WOW thank you for being so thorough. I will implement this later today and get back to you with the results

  5. #4
    Junior Member
    Join Date
    May 2011
    Posts
    8
    Member #
    27747
    Seems to have fixed the problem. Thank you!


    And by the way, it's salt that's falling on that girls tongue.

  6. #5
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    EWWWWWWWWWWWWWWW. You serious, dude? That is just NASTY.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


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
  •  

Search tags for this page

images only 1px high in ie

Click on a term to search for related topics.
All times are GMT -6. The time now is 09:19 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com