Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer Code not working in Internet Explorer

    Hi there i have been looking around the internet for a way to resolve the problem i have, admittedly i may well of read the answer several times but being relatively new to JavaScript i am still unclear on much of the terminology. Well basically my problem is that i have a piece of code which wen tested on my mac i was using Firefox, safari, opera etc. all these worked fine when it came to pc testing with internet explorer i was presented with the following errors.....

    Error Details:

    1) Line:32
    Char:16
    Error: 'getElementsByTagName(...).0.src' is null or not an object
    Code:0
    URL:http://www.janedelacey.co.uk/html/press.html

    2) Line:53
    Char:41
    Error: Object doesnt support this property or method
    Code:0
    URL:http://www.janedelacey.co.uk/html/press.html

    The url is a clients webpage i dont think this has any effect on the issue. Here is the code for the page if this helps anyone in helping me resolve the issue!

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    
    <html>
    	<head>
    	<LINK REL="SHORTCUT ICON" HREF="../images/favicon.ico">
    		<link rel="stylesheet" type="text/css" href="../css/layout.css">
    		<title>
    		Jane De-Lacey  - Press
    		</title>
    		<link rel="shortcut icon" href="favicon.ico" >
    				<meta name="description" content="Jane De Lacey is a freelance lingerie designer and manufacturer using the finest silk to create Bras, Briefs, Camisoles, Slip, Dresses and Sleepmasks. The latest collection is called the 'L.A Collection'. ">
    		<meta name="keywords" content="Jane De Lacey, Jane DeLacey, Lingerie, 100% Silk, Bra, Knickers, Briefs, Slips, Camisoles, Dresses, Sleepmasks, Underwear, Sheer Silk, Chemise">
    <!--[if lt IE 8]>
        <style media="screen,projection" type="text/css">
            #jgal1 li { filter: alpha(opacity=40); }
            #jgal1 li.active, #jgal1 li:hover { filter: alpha(opacity=100); }
        </style>
    	<![endif]-->
        <script type="text/javascript">document.write("<style type='text/css'> #press_gallery { display: none; } </style>");</script>
        <!--[if lt IE 6]><style media="screen,projection" type="text/css">#press_gallery { display: block; }</style><![endif]-->
    
    
        <script type="text/javascript">
    var gal1 = {
        init : function() {
            if (!document.getElementById || !document.createElement || !document.appendChild) return false;
            if (document.getElementById('press_gallery')) document.getElementById('press_gallery').id = 'jgal1';
            var li = document.getElementById('jgal1').getElementsByTagName('li');
            li[0].className = 'active';
            for (i=0; i<li.length; i++) {
               				var url = li[i].getElementsByTagName('img')[0].src;
    						var url_array = url.split("/");
    						var j = url_array.length - 1;
    						var thumb_path = "../images/thumbs/";
    						li[i].style.backgroundImage = 'url(' + thumb_path + url_array[j] + ')';
                li[i].style.backgroundRepeat = 'no-repeat';
                li[i].title = li[i].getElementsByTagName('img')[0].alt;
                gal1.addEvent(li[i],'click',function() {
                    var im = document.getElementById('jgal1').getElementsByTagName('li');
                    for (j=0; j<im.length; j++) {
                        im[j].className = '';
                    }                this.className = 'active';
                });
            }
        },
           addEvent : function(obj, type, fn) {
            if (obj.addEventListener) {
                obj.addEventListener(type, fn, false);
            }
            else if (obj.attachEvent) {
                obj["e"+type+fn] = fn;
                obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
                obj.attachEvent("on"+type, obj[type+fn]);
            }
        }
        
     } 
     
    gal1.addEvent(window,'load', function() {
        gal1.init();
    });
        </script>
    
    		
    	</head>
    	
    	<body>
    	
    	<div id="content">
    			<div id="navcontainer">
    		<div id="topbanner">
    			<a href="home.html"><img  src="../images/logo1.gif" border="none" width="380" height="50"alt="Home - Jane DeLacey"/></a>
    		</div>
    	
    	
    		
           		<ul id="nav">
         			<li id="nav-home"><a href="home.html">Home</a></li>
       	        	<li id="nav-shop"><a href="shop.html">Collections</a></li>
        			<li id="nav-press"><a href="press.html">Press</a></li>
        			<li id="nav-about"><a href="about.html">About Us</a></li>
       	        	<li id="nav-contact"><a href="contact.html">Contact Us</a></li>
             	</ul>
       		 </div>	
       		 
       		 
       		 <div id="product">
    	
    	<div id="product_graf">
    				<img src="../images/top_lines.gif" alt="Side Graphic" height="300px">
    		</div>
    <div id="press">
    
    <div id="press_text">
    click logo to view image, click image to enlarge
    </div>
    		<div id="press_pics">
    		
    			<ul id="press_gallery">
    				<li><a href="../images/press/marieclaire.jpg"><img src="../images/press/marieclaire.jpg"width="475px" height="500px" alt="Marie Claire featuring Victoria Beckham"  border="none" ></a></li>
    
       				<li><a href="../images/press/vogue1.jpg"<img src="../images/press/vogue1.jpg"width="350px" height="500px" alt="Vogue" border="none"></a></li>
        			<li><a href="../images/press/elle1.jpg"<img src="../images/press/elle1.jpg"width="350px" height="500px" alt="ELLE" border="none" ></a></li>
        			<li><a href="../images/press/wwd1.jpg"<img src="../images/press/wwd1.jpg"width="350px" height="500px" alt="Womens Wear Daily"  border="none" ></a></li>
        			<li><a href="../images/press/brides.jpg"<img src="../images/press/brides.jpg" width="350px" height="500px"alt="Brides"  border="none" ></a></li>
        			<li><a href="../images/press/wwd2.jpg"<img src="../images/press/wwd2.jpg" width="350px" height="500px"alt="ELLE"  border="none" ></a></li>
        			<li><a href="../images/press/elle2.jpg"<img src="../images/press/elle2.jpg" width="350px" height="500px"alt="ELLE"  border="none" ></a></li>
        			<li><a href="../images/press/hg.jpg"<img src="../images/press/hg.jpg" width="350px" height="500px"alt="Homes and Gardens"  border="none" ></a></li>
        			<li><a href="../images/press/vogue2.jpg"<img src="../images/press/vogue2.jpg" width="350px" height="500px"alt="Vogue"  border="none" ></a></li>
        			<li><a href="../images/press/wwd3.jpg"<img src="../images/press/wwd3.jpg" width="350px" height="500px"alt="Womens Wear Daily" border="none"  ></a></li>
        			<li><a href="../images/press/elle3.jpg"<img src="../images/press/elle3.jpg" width="350px" height="500px"alt="ELLE"  border="none" ></a></li>
        			<li><a href="../images/press/status1.jpg"<img src="../images/press/status1.jpg" width="350px" height="500px"alt="Status" border="none"  ></a></li>
        			<li><a href="../images/press/elle4.jpg"<img src="../images/press/elle4.jpg"width="500px" height="350px" alt="ELLE" border="none"  ></a></li>
        			<li><a href="../images/press/wwd4.jpg"<img src="../images/press/wwd4.jpg"width="350px" height="500px" alt="Womens Wear Daily"  border="none" ></a></li>
        			<li><a href="../images/press/status2.jpg"<img src="../images/press/status2.jpg" width="350px" height="500px"alt="Status"  border="none" ></a></li>
        			<li><a href="../images/press/fashiondaily.jpg"<img src="../images/press/fashiondaily.jpg" width="500px" height="350px"alt="Fashion Daily"  border="none" ></a></li>
        			<li><a href="../images/press/eve.jpg"<img src="../images/press/eve.jpg" width="350px" height="500px"alt="Eve"  border="none" ></a></li>
        			<li><a href="../images/press/observer.jpg"<img src="../images/press/observer.jpg" width="350px" height="500px"alt="Observer Magazine"  border="none" ></a></li>
        			<li><a href="../images/press/telegraph.jpg"<img src="../images/press/telegraph.jpg" width="350px" height="500px"alt="Telegraph"  border="none" ></a></li>
        			<li><a href="../images/press/financialtimes.jpg"<img src="../images/press/financialtimes.jpg" width="350px" height="500px"alt="Financial Times"  border="none" ></a></li>
        			<li><a href="../images/press/linbuyer.jpg"<img src="../images/press/linbuyer.jpg" width="350px" height="500px"alt="Lingerie Buyer Blog"  border="none" ></a></li>
        			<li><a href="../images/press/juice1.jpg"<img src="../images/press/juice1.jpg" width="350px" height="500px"alt="Juice Brighton Magazine"  border="none" ></a></li>
        			<li><a href="../images/press/ideal.jpg"<img src="../images/press/ideal.jpg" width="350px" height="500px"alt="Ideal" border="none"  ></a></li>
        			<li><a href="../images/press/drapers.jpg"<img src="../images/press/drapers.jpg" width="500px" height="200px"alt="Drapers"  border="none" ></a></li>
        			<li><a href="../images/press/juice2.jpg"<img src="../images/press/juice2.jpg" width="500px" height="350px"alt="Juice Brighton Magazine" border="none"  ></a></li>
        			
      			 </ul>	
    		</div>
    <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
    </div>
    
    
    
    
    		<div id="footer">
    			<ul id="footer_nav">
    			<li><a href="terms.html">terms & conditions</a></li>
    			<li><a href="delivery.html">delivery</a></li>
    			<li><a href="acknowledge.html">acknowledgments</a></li>
    			<li><a href="contact.html">contact us</a></li>
    			</ul>
    		
       		 </div>		
    		</div>
    	</div>
    </body>
    </html>
    I know most of this code will not be relevant but i thought adding the whole pages code made more sense? Thank you in advance for any help received!

    Tom

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,535
    Thanks
    3
    Thanked 513 Times in 500 Posts
    Code:
       				<li><a href="../images/press/vogue1.jpg"> <img src="http://www.vicsjavascripts.org.uk/StdImages/One.gif"width="350px" height="500px" alt="Vogue" border="none"></a></li>
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • #3
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow thanks for the quick response cant believe i missed something so simple!?! Just changed all the images so they all had this extra '>' im not getting any error messages now, however its still not loading. Im just getting the top menu, side graphic and footer. http://www.janedelacey.co.uk/html/press.html if you want to see the page yourself? Thanks again for the quick response! and i hope you can continue helping me resolve this problem!


    Tom

  • #4
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Tomatron View Post
    Hi there i have been looking around the internet for a way to resolve the problem i have, admittedly i may well of read the answer several times but being relatively new to JavaScript i am still unclear on much of the terminology. Well basically my problem is that i have a piece of code which wen tested on my mac i was using Firefox, safari, opera etc. all these worked fine when it came to pc testing with internet explorer i was presented with the following errors.....

    Error Details:

    1) Line:32
    Char:16
    Error: 'getElementsByTagName(...).0.src' is null or not an object
    Code:0
    URL:http://www.janedelacey.co.uk/html/press.html

    2) Line:53
    Char:41
    Error: Object doesnt support this property or method
    Code:0
    URL:http://www.janedelacey.co.uk/html/press.html

    The url is a clients webpage i dont think this has any effect on the issue. Here is the code for the page if this helps anyone in helping me resolve the issue!

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    
    <html>
    	<head>
    	<LINK REL="SHORTCUT ICON" HREF="../images/favicon.ico">
    		<link rel="stylesheet" type="text/css" href="../css/layout.css">
    		<title>
    		Jane De-Lacey  - Press
    		</title>
    		<link rel="shortcut icon" href="favicon.ico" >
    				<meta name="description" content="Jane De Lacey is a freelance lingerie designer and manufacturer using the finest silk to create Bras, Briefs, Camisoles, Slip, Dresses and Sleepmasks. The latest collection is called the 'L.A Collection'. ">
    		<meta name="keywords" content="Jane De Lacey, Jane DeLacey, Lingerie, 100% Silk, Bra, Knickers, Briefs, Slips, Camisoles, Dresses, Sleepmasks, Underwear, Sheer Silk, Chemise">
    <!--[if lt IE 8]>
        <style media="screen,projection" type="text/css">
            #jgal1 li { filter: alpha(opacity=40); }
            #jgal1 li.active, #jgal1 li:hover { filter: alpha(opacity=100); }
        </style>
    	<![endif]-->
        <script type="text/javascript">document.write("<style type='text/css'> #press_gallery { display: none; } </style>");</script>
        <!--[if lt IE 6]><style media="screen,projection" type="text/css">#press_gallery { display: block; }</style><![endif]-->
    
    
        <script type="text/javascript">
    var gal1 = {
        init : function() {
            if (!document.getElementById || !document.createElement || !document.appendChild) return false;
            if (document.getElementById('press_gallery')) document.getElementById('press_gallery').id = 'jgal1';
            var li = document.getElementById('jgal1').getElementsByTagName('li');
            li[0].className = 'active';
            for (i=0; i<li.length; i++) {
               				var url = li[i].getElementsByTagName('img')[0].src;
    						var url_array = url.split("/");
    						var j = url_array.length - 1;
    						var thumb_path = "../images/thumbs/";
    						li[i].style.backgroundImage = 'url(' + thumb_path + url_array[j] + ')';
                li[i].style.backgroundRepeat = 'no-repeat';
                li[i].title = li[i].getElementsByTagName('img')[0].alt;
                gal1.addEvent(li[i],'click',function() {
                    var im = document.getElementById('jgal1').getElementsByTagName('li');
                    for (j=0; j<im.length; j++) {
                        im[j].className = '';
                    }                this.className = 'active';
                });
            }
        },
           addEvent : function(obj, type, fn) {
            if (obj.addEventListener) {
                obj.addEventListener(type, fn, false);
            }
            else if (obj.attachEvent) {
                obj["e"+type+fn] = fn;
                obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
                obj.attachEvent("on"+type, obj[type+fn]);
            }
        }
        
     } 
     
    gal1.addEvent(window,'load', function() {
        gal1.init();
    });
        </script>
    
    		
    	</head>
    	
    	<body>
    	
    	<div id="content">
    			<div id="navcontainer">
    		<div id="topbanner">
    			<a href="home.html"><img  src="../images/logo1.gif" border="none" width="380" height="50"alt="Home - Jane DeLacey"/></a>
    		</div>
    	
    	
    		
           		<ul id="nav">
         			<li id="nav-home"><a href="home.html">Home</a></li>
       	        	<li id="nav-shop"><a href="shop.html">Collections</a></li>
        			<li id="nav-press"><a href="press.html">Press</a></li>
        			<li id="nav-about"><a href="about.html">About Us</a></li>
       	        	<li id="nav-contact"><a href="contact.html">Contact Us</a></li>
             	</ul>
       		 </div>	
       		 
       		 
       		 <div id="product">
    	
    	<div id="product_graf">
    				<img src="../images/top_lines.gif" alt="Side Graphic" height="300px">
    		</div>
    <div id="press">
    
    <div id="press_text">
    click logo to view image, click image to enlarge
    </div>
    		<div id="press_pics">
    		
    			<ul id="press_gallery">
    				<li><a href="../images/press/marieclaire.jpg"><img src="../images/press/marieclaire.jpg"width="475px" height="500px" alt="Marie Claire featuring Victoria Beckham"  border="none" ></a></li>
    
       				<li><a href="../images/press/vogue1.jpg"<img src="../images/press/vogue1.jpg"width="350px" height="500px" alt="Vogue" border="none"></a></li>
        			<li><a href="../images/press/elle1.jpg"<img src="../images/press/elle1.jpg"width="350px" height="500px" alt="ELLE" border="none" ></a></li>
        			<li><a href="../images/press/wwd1.jpg"<img src="../images/press/wwd1.jpg"width="350px" height="500px" alt="Womens Wear Daily"  border="none" ></a></li>
        			<li><a href="../images/press/brides.jpg"<img src="../images/press/brides.jpg" width="350px" height="500px"alt="Brides"  border="none" ></a></li>
        			<li><a href="../images/press/wwd2.jpg"<img src="../images/press/wwd2.jpg" width="350px" height="500px"alt="ELLE"  border="none" ></a></li>
        			<li><a href="../images/press/elle2.jpg"<img src="../images/press/elle2.jpg" width="350px" height="500px"alt="ELLE"  border="none" ></a></li>
        			<li><a href="../images/press/hg.jpg"<img src="../images/press/hg.jpg" width="350px" height="500px"alt="Homes and Gardens"  border="none" ></a></li>
        			<li><a href="../images/press/vogue2.jpg"<img src="../images/press/vogue2.jpg" width="350px" height="500px"alt="Vogue"  border="none" ></a></li>
        			<li><a href="../images/press/wwd3.jpg"<img src="../images/press/wwd3.jpg" width="350px" height="500px"alt="Womens Wear Daily" border="none"  ></a></li>
        			<li><a href="../images/press/elle3.jpg"<img src="../images/press/elle3.jpg" width="350px" height="500px"alt="ELLE"  border="none" ></a></li>
        			<li><a href="../images/press/status1.jpg"<img src="../images/press/status1.jpg" width="350px" height="500px"alt="Status" border="none"  ></a></li>
        			<li><a href="../images/press/elle4.jpg"<img src="../images/press/elle4.jpg"width="500px" height="350px" alt="ELLE" border="none"  ></a></li>
        			<li><a href="../images/press/wwd4.jpg"<img src="../images/press/wwd4.jpg"width="350px" height="500px" alt="Womens Wear Daily"  border="none" ></a></li>
        			<li><a href="../images/press/status2.jpg"<img src="../images/press/status2.jpg" width="350px" height="500px"alt="Status"  border="none" ></a></li>
        			<li><a href="../images/press/fashiondaily.jpg"<img src="../images/press/fashiondaily.jpg" width="500px" height="350px"alt="Fashion Daily"  border="none" ></a></li>
        			<li><a href="../images/press/eve.jpg"<img src="../images/press/eve.jpg" width="350px" height="500px"alt="Eve"  border="none" ></a></li>
        			<li><a href="../images/press/observer.jpg"<img src="../images/press/observer.jpg" width="350px" height="500px"alt="Observer Magazine"  border="none" ></a></li>
        			<li><a href="../images/press/telegraph.jpg"<img src="../images/press/telegraph.jpg" width="350px" height="500px"alt="Telegraph"  border="none" ></a></li>
        			<li><a href="../images/press/financialtimes.jpg"<img src="../images/press/financialtimes.jpg" width="350px" height="500px"alt="Financial Times"  border="none" ></a></li>
        			<li><a href="../images/press/linbuyer.jpg"<img src="../images/press/linbuyer.jpg" width="350px" height="500px"alt="Lingerie Buyer Blog"  border="none" ></a></li>
        			<li><a href="../images/press/juice1.jpg"<img src="../images/press/juice1.jpg" width="350px" height="500px"alt="Juice Brighton Magazine"  border="none" ></a></li>
        			<li><a href="../images/press/ideal.jpg"<img src="../images/press/ideal.jpg" width="350px" height="500px"alt="Ideal" border="none"  ></a></li>
        			<li><a href="../images/press/drapers.jpg"<img src="../images/press/drapers.jpg" width="500px" height="200px"alt="Drapers"  border="none" ></a></li>
        			<li><a href="../images/press/juice2.jpg"<img src="../images/press/juice2.jpg" width="500px" height="350px"alt="Juice Brighton Magazine" border="none"  ></a></li>
        			
      			 </ul>	
    		</div>
    <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
    </div>
    
    
    
    
    		<div id="footer">
    			<ul id="footer_nav">
    			<li><a href="terms.html">terms & conditions</a></li>
    			<li><a href="delivery.html">delivery</a></li>
    			<li><a href="acknowledge.html">acknowledgments</a></li>
    			<li><a href="contact.html">contact us</a></li>
    			</ul>
    		
       		 </div>		
    		</div>
    	</div>
    </body>
    </html>
    I know most of this code will not be relevant but i thought adding the whole pages code made more sense? Thank you in advance for any help received!

    Tom
    Just one question for you guys. I am new website designer but facing strange problem. My template code works in Chrome and Mozilla but not in internet explorer Why?

  • #5
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    3,020
    Thanks
    56
    Thanked 566 Times in 563 Posts
    it could be any one of a dozen or so things. Show us some code or a link and you will have a better chance of getting an answer

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,652
    Thanks
    80
    Thanked 4,638 Times in 4,600 Posts
    And do *NOT* hijack old threads. Start a *NEW THREAD* with your question and your code. And don't forget to put [code]...[ /code] tags around your code.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #7
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ConradPhillip View Post
    Just one question for you guys. I am new website designer but facing strange buy lingerie problem. My template code works in Chrome and Mozilla but not in internet explorer Why?
    I need to find out the problem as the thread is not helping me.

  • #8
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,652
    Thanks
    80
    Thanked 4,638 Times in 4,600 Posts
    One more time: Start a *NEW* thread. Post the DETAILS of your question, including your code.

    How do you expect somebody to *GUESS* which of dozens of reasons might be the cause of your problem when you give us ZERO information?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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