Jump to content

Website not working in Internet Explorer

Clanscorpia

Hi everyone,

Ive made a website for one of my buisness assignments but I have a major issue. None of the buttons are working in Internet Explorer. This is really odd because it works perfectly fine in everything else. If you guys can spot anything that would make it incompatible with IE that would be awesome.

Spoiler

<!DOCTYPE html>
<html><head>
<link rel="stylesheet" type="text/css" href="index.css">
<!--Index page for Wills Assignment-->
<title> Will's Website </title>
<script src="index.js"></script> 
<script src="Page2.js"></script> 
<script src="Page3.js"></script> 
</head>

<body>
<header>
<center>
<h1 class="heading">Index page of Will's Website</h1>
<button class="button" onClick="visitP2();">Page 2</button><button class="button" onClick="visitP3();">Page 3</button>
</center>
</header>
<center><h1 class="heading">All about me - Will *******</h1></center>
<hr>

<ol class="list">
<h2 class="heading">My Family</h2>
<li>Will *** - 15 </li>
<li>Johnny *** - 13 </li>
<li>Lily *** - 10 </li>
<li>Ben *** - 8</li>
<li>Samantha *** - 42</li>
<li>Chris *** - 42</li>
</ol>
<ol class="list">
<h2 class="heading">Where I've lived and went to school</h2>
<li>Olympus Avenue - 1 year</li>
<li>Carriage Lane - 4 years
<br>
*** - 4 years</li>
<li>Powell Court - Current
<br>
*** - 8 years </li>
</ol>
<img src="mod.jpg" alt="MOD" style="width:350px;height:400px;">
<br>
<div class="a">
<a href="*******/">School Website</a>
</div>
</body>

<footer>
<center><h4 class="heading">Made by Will **** - Grade 9 - 2018</h4></center>
<center><button class="button"><a href="mailto:*****@gmail.com">Email</a></button> </center>
</footer>

</html>

 

 

Spoiler

@charset "utf-8";

body {
	font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", "serif";
    background-color: #FF363A;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	margin-left: 0px;
}

footer {
    background-color: tomato;
	width: 100%;
}

header {
	background-color: tomato;
    width: 100%;
	height: 5%;
	margin-top: 0px;
}

a.link, a.visited, a.hover, a.active {
	color: red;
	text-decoration: none;
}
.heading {
	color:black;
}

.list, p {
	color:black;
	width: 29%;
	text-align: justify;
	line-height: 25px;
	float: left;
	padding-left: 20px;
	padding-right: 20px;
	font-size: 18px;
}

.button {
    background-color: white;
    border: solid;
	border-color: red;
	border-width: 1px;
    color: black;
    padding: 15px 32px;
    text-align: center;
    display: inline-block;
    font-size: 16px;
	margin-right: 20px;
	margin-left: 20px;
	margin-bottom: 10px;
	
	
}

.button2 {
    background-color: white;
    border: solid;
	border-color: red ;
	border-width: 1px;
    color: black;
    padding: 10px 10px;
    text-align: center;
    display: inline-block;
    font-size: 16px;
	margin-right: 20px;
	margin-left: 20px;
	margin-bottom: 10px;
}

div.a {
	text-align: right;
	padding-right: 500px;
}

 

//Function for accessing Index page
    function visitI(){
        window.location='index.htm';
    }

 

He who asks is stupid for 5 minutes. He who does not ask, remains stupid. -Chinese proverb. 

Those who know much are aware that they know little. - Slick roasting me

Spoiler

AXIOM

CPU- Intel i5-6500 GPU- EVGA 1060 6GB Motherboard- Gigabyte GA-H170-D3H RAM- 8GB HyperX DDR4-2133 PSU- EVGA GQ 650w HDD- OEM 750GB Seagate Case- NZXT S340 Mouse- Logitech Gaming g402 Keyboard-  Azio MGK1 Headset- HyperX Cloud Core

Offical first poster LTT V2.0

 

Link to comment
Share on other sites

Link to post
Share on other sites

IE is just a bitch when it comes to web development...

 

3 seconds of googling suggest using document.location instead of window.location

75% of what I say is sarcastic

 

So is the rest probably

Link to comment
Share on other sites

Link to post
Share on other sites

Are you just trying to change the URL? If so, this should use an <a> tag instead of JavaScript:

<a href="page-2's-url.html"><button class="button">Page 2</button></a>

If you are trying to do a partial page change or are required to change the URL with JavaScript could you attach your scripts?

Web Developer and Java contractor

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, programmer said:

Are you just trying to change the URL? If so, this should use an <a> tag instead of JavaScript:


<a href="page-2's-url.html"><button class="button">Page 2</button></a>

If you are trying to do a partial page change or are required to change the URL with JavaScript could you attach your scripts?

You can actually redirect using JavaScript, an a tag would rrquire the user to click on said link

75% of what I say is sarcastic

 

So is the rest probably

Link to comment
Share on other sites

Link to post
Share on other sites

On 3/24/2018 at 7:31 PM, Clanscorpia said:

Hi everyone,

Ive made a website for one of my buisness assignments but I have a major issue. None of the buttons are working in Internet Explorer. This is really odd because it works perfectly fine in everything else. If you guys can spot anything that would make it incompatible with IE that would be awesome.

 

I seem to remember internet explorer checks the !DOCTYPE declaration to select which mode to use. Without any specific !DOCTYPE declaration it emulates old internet explorer quircks. Try using the correct, specific, !DOCTYPE

Link to comment
Share on other sites

Link to post
Share on other sites

Well you guys all responded after the assignment was due but thats okay lmao. It ended up being because of an Internet Explorer security error that wouldnt let it go to the links for some reason. Thanks for the help though

He who asks is stupid for 5 minutes. He who does not ask, remains stupid. -Chinese proverb. 

Those who know much are aware that they know little. - Slick roasting me

Spoiler

AXIOM

CPU- Intel i5-6500 GPU- EVGA 1060 6GB Motherboard- Gigabyte GA-H170-D3H RAM- 8GB HyperX DDR4-2133 PSU- EVGA GQ 650w HDD- OEM 750GB Seagate Case- NZXT S340 Mouse- Logitech Gaming g402 Keyboard-  Azio MGK1 Headset- HyperX Cloud Core

Offical first poster LTT V2.0

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×