vet911 Posted January 10, 2012 Share Posted January 10, 2012 I'm having trouble with my header.php file in internet explorer, but it works fine in Chrome and firefox. I'm not sure what the problem is, any help would be appreciated. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>CMC/title> <meta name="Description" content="newsletter" /> <meta name="Keywords" content="newsletter, crystals, minerals, Capital, clubs" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="Copyright" content=" All Rights Reserved." /> <meta http-equiv="Content-Language" content="en" /> <meta name="revisit-after" content="15 days" /> <meta name="robots" content="index,follow" /> <meta name="Rating" content="General" /> <link href="styles/capital.css" rel="stylesheet" type="text/css" /> <script language="javascript"> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin // Set up the image files to be used. var theImages = new Array() // do not change this // To add more image files, continue with the // pattern below, adding to the array. theImages[0] = 'image/smkquartz3.png' theImages[1] = 'image/aquama2t.png' theImages[2] = 'image/azurite4t.png' theImages[3] = 'image/redber2t.png' // do not edit anything below this line var j = 0 var p = theImages.length; var preBuffer = new Array() for (i = 0; i < p; i++){ preBuffer[i] = new Image() preBuffer[i].src = theImages[i] } var whichImage = Math.round(Math.random()*(p-1)); function showImage(){ document.write('<img src="'+theImages[whichImage]+'">'); } // End --> </script> </head> <body> <a id="top_anchor" name="top_anchor"></a> <div id="container"><br> <div id="header"><center> <script language="javascript"> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin showImage(); </script><!-- Script Size: 1.49 KB --> <img border="2" src="image/img1.png" width="108" height="127"> <script language="javascript"> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin showImage(); </script><!-- Script Size: 1.49 KB --><br><br> <div><h2><a>Monthly Meetings<br> Salvation Army Building<br> Clinton Street, </a><br> </div> </center> </div> Is there something wrong with the doctype? Thanks for any help. Quote Link to comment https://forums.phpfreaks.com/topic/254691-im-having-trouble-with-my-headerphp-file-in-internet-explorer/ Share on other sites More sharing options...
pleek Posted January 10, 2012 Share Posted January 10, 2012 First thing i see is this isn't php so not sure why ur files is header.php. Are you trying to include header.php in the "header" div?. Also looking at your code your html is not complete. you have several tags without closing tags. Example <div id="container"> has no closing </div> tag. Need to learn the basics of html before you try to use javascript and php. Quote Link to comment https://forums.phpfreaks.com/topic/254691-im-having-trouble-with-my-headerphp-file-in-internet-explorer/#findComment-1305989 Share on other sites More sharing options...
vet911 Posted January 10, 2012 Author Share Posted January 10, 2012 My index.php has the following: <?php include('header.php'); include('menu.php'); include('intro.php'); include('notice.php'); include('footer.php'); ?> Is this not possible to do? It works perfectly in like I said Firefox, Chrome, web browsers. Quote Link to comment https://forums.phpfreaks.com/topic/254691-im-having-trouble-with-my-headerphp-file-in-internet-explorer/#findComment-1305991 Share on other sites More sharing options...
deathadder Posted January 10, 2012 Share Posted January 10, 2012 what error are you getting are you gettign it with other browsers? is it a style error or a php error? the error could be related to your css file not being compadable with ie, as to pleek if you scroll down to the bottom you will see the two end tags for the divisions Quote Link to comment https://forums.phpfreaks.com/topic/254691-im-having-trouble-with-my-headerphp-file-in-internet-explorer/#findComment-1306076 Share on other sites More sharing options...
vet911 Posted January 11, 2012 Author Share Posted January 11, 2012 Okay, I finally figured it out, had to remove the javascript, now works fine. Below is what i did. It turned out the javascript comments were the problem. Added a php file to do the same thing, random image showing. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>CMC/title> <meta name="Description" content="newsletter" /> <meta name="Keywords" content="newsletter, crystals, minerals, Capital, clubs" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="Copyright" content=" All Rights Reserved." /> <meta http-equiv="Content-Language" content="en" /> <meta name="revisit-after" content="15 days" /> <meta name="robots" content="index,follow" /> <meta name="Rating" content="General" /> <link href="styles/capital.css" rel="stylesheet" type="text/css" /> </head> <body> <a id="top_anchor" name="top_anchor"></a> <div id="container"><br> <div id="header"><center> <img border="2" src="image/img1.png" width="108" height="127"> <br><br> <div><h2><a>Monthly Meetings<br> Salvation Army Building<br> Clinton Street, </a><br> </div> </center> </div> Quote Link to comment https://forums.phpfreaks.com/topic/254691-im-having-trouble-with-my-headerphp-file-in-internet-explorer/#findComment-1306330 Share on other sites More sharing options...
RobertP Posted January 21, 2012 Share Posted January 21, 2012 just seen at a quick glance <title>CMC/title> Quote Link to comment https://forums.phpfreaks.com/topic/254691-im-having-trouble-with-my-headerphp-file-in-internet-explorer/#findComment-1309790 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.