Jump to content

I'm having trouble with my header.php file in internet explorer,


Recommended Posts

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.

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.

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.

 

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

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>

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.