Having problems getting a javascript button to work in IE. I used javascript to create a button that refreshes my page with randomly selected text from a pre-determined array. It works perfectly in Firefox, Chrome, and Safari, but not in IE. In IE, nothing refreshes.
Can anyone help me with a fix so that this Javascript works in IE?
<html>
<head>
<title>WTF </title>
</head>
<style type="text/css">
#reason {font-family: "Helvetica", serif; color: white; }
button{
color:#08233e;
font:2.4em Futura, ‘Century Gothic’, AppleGothic, sans-serif;
font-size:70%;
padding:14px;
background:url(overlay.png) repeat-x center #ffcc00;
background-color:rgba(255,204,0,1);
border:1px solid #ffcc00;
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
border-bottom:1px solid #9f9f9f;
-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.5);
-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.5);
box-shadow:inset 0 1px 0 rgba(255,255,255,0.5);
cursor:pointer;
}
button:hover{background-color:rgba(255,204,0,0.8);}
</style>
<body>
<div class="con">
<p id="reason" >
<center><script language="JavaScript">
var r_text = new Array ();
r_text[0] = "Sample 1";
r_text[1] = "Sample 2";
r_text[2] = "Sample 3";
var i = Math.floor(3*Math.random())
document.write(r_text[i]);
</script>
</p>
<br>
<a href="" class="button1"><button>TELL ME MORE</button></a><br>
</div>
</body>
</html>