Jump to content

[SOLVED] script not compatible with IE8


KFredje

Recommended Posts

hi,

 

I downloaded a script for a guestbook which is compatible with FF and IE7 but not IE8.

 

Is there an easy way to fix this?

 

This are the pages (some of them):

 

header.php

<?php
session_start();
?>
<!-- NOTE: PLEASE DO NOT REMOVE THE BELLOW 3 LINES FROM YOUR HEADER FILE -->
<?php
include("gbclass.php");
include("config.php");
include("language/$default_language");
?>
<!-- NOTE: PLEASE DO NOT REMOVE THE ABOVE 3 LINES FROM YOUR HEADER FILE -->

<html>
<head>
  <title>Windmolentechnologie</title>
  <link rel="STYLESHEET" type="text/css" href="style.css">
<LINK HREF="../css/ENnav.css" REL="stylesheet" TYPE="text/css" />
<LINK HREF="../css/ENcontent.css" REL="stylesheet" TYPE="text/css" />
<!--[if lte IE 7]>
<LINK HREF="../css/ie7.css" REL="stylesheet" TYPE="text/css" />
<![endif]-->

<script type="text/javascript" src="../js/klok.js"></script>

<?php
   switch($_GET['pagina']) {
            case "inhoud": $page="../ENinhoud.html";break;
		case "logboek": $page="../ENlogboek.html";break;
            case "profielen": $page="../ENprofielen.html";break;
		case "kalender": $page="../ENkalender.html";break;
            case "gastenboek": $page="guestbook.php";break;
            default: $page="../ENhome.html";break;
   }
?>
<?php 
$myvar=file_get_contents("../text.txt");
$myvar2=explode("\n",$myvar);
?>

</head>
<body>
<div id="container">
<div id="NavTop"><a href="../BEindex.php"><img class="be" src="../images/be.gif"></a><a href="../FRindex.php"><img class="fr" src="../images/fr.gif"></a><a href="../ENindex.php"><img class="en" src="../images/en.gif"></a></div>
<div id="NavTitle"></div>
<div id="NavHome"><a href="../ENindex.php?pagina=home"><img src="../images/transparent.gif" class="transparent"></a></div>
<div id="NavInhoud"><a href="../ENindex.php?pagina=inhoud"><img src="../images/transparent.gif" class="transparent"></a></div>
<div id="NavLogboek"><a href="../ENindex.php?pagina=logboek"><img src="../images/transparent.gif" class="transparent"></a></div>
<div id="NavProfielen"><a href="../ENindex.php?pagina=profielen"><img src="../images/transparent.gif" class="transparent"></a></div>
<div id="NavKalender"><a href="../ENindex.php?pagina=kalender"><img src="../images/transparent.gif" class="transparent"></a></div>
<div id="NavGastenboek"><a href="guestbook.php"><img src="../images/transparent.gif" class="transparent"></a></div>
<div id="NavBlank"></div>
<div id="NavBanner"></div>

<div id="midden">

<div id="ContentLeft">
<table id="klok"><tr>
<td id="kloktd">
<img src="../dg8.gif" name="hr1"><img src="../dg8.gif" name="hr2"><img src="../dgc.gif" name="c"><img src="../dg8.gif" name="mn1"><img src="../dg8.gif" name="mn2"><img src="../dgc.gif" name="c"><img src="../dg8.gif" name="se1"><img src="../dg8.gif" name="se2">
</td></tr></table>
<div id="nieuws"><?php echo $myvar2[4]; ?></div>
</div>

<div id="ContentRight">
<div id="ContentRightGastenboek">
<center>
<center>
[ <a href="guestbook.php"><b><?php echo $addentrytxt ?></b></a> ]
[ <a href="list.php?page=1&order=asc"><b><?php echo $viewguestbooktxt ?></b></a> ]<br>
[ <a href="list.php?page=1&order=asc"><?php echo $newpostfirsttxt ?></a> ]
[ <a href="list.php?page=1&order=desc"><?php echo $newpostlasttxt ?></a> ]</center>
<br>

 

footer.php

</td></tr></table>
</center>
</div>
</div>
<div id="Footer"></div>
</div>
</div>

 

guestbook.php

<?php
include("header.php");
//include("language/language.php");
?>

<script language="JavaScript" type="text/javascript">
function emoticon(text) {
var txtarea = document.post.yourmessage;
text = ' ' + text + ' ';
if (txtarea.createTextRange && txtarea.caretPos) {
	var caretPos = txtarea.caretPos;
	caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
	txtarea.focus();
} else {
	txtarea.value  += text;
	txtarea.focus();
}
}

function bbcode(text) {
var txtarea = document.post.yourmessage;
text = ' ' + text + ' ';
if (txtarea.createTextRange && txtarea.caretPos) {
	var caretPos = txtarea.caretPos;
	caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
	txtarea.focus();
} else {
	txtarea.value  += text;
	txtarea.focus();
}
}

</script>
<table bgcolor=#EFEFEF bordercolor=#C0C0C0 border=1 width=500 cellspacing=0 cellpadding=10><tr><td background="images/toolbar.jpg" height="20"></td></tr><tr><td>
<!-- Smiley List Starts Here -->
<center>
<table width="100" border="0" cellspacing="0" cellpadding="5">
			<tr align="center" valign="middle">
			  <td><a href="javascript:emoticon('')"><img src="images/icon_biggrin.gif" border="0" alt="Very Happy" title="Very Happy"></a></td>
			  <td><a href="javascript:emoticon('')"><img src="images/icon_smile.gif" border="0" alt="Smile" title="Smile"></a></td>
			  <td><a href="javascript:emoticon('')"><img src="images/icon_sad.gif" border="0" alt="Sad" title="Sad"></a></td>
			  <td><a href="javascript:emoticon('')"><img src="images/icon_surprised.gif" border="0" alt="Surprised" title="Surprised"></a></td>
			  <td><a href="javascript:emoticon(':shock:')"><img src="images/icon_eek.gif" border="0" alt="Shocked" title="Shocked"></a></td>
			  <td><a href="javascript:emoticon(':?')"><img src="images/icon_confused.gif" border="0" alt="Confused" title="Confused"></a></td>
			  <td><a href="javascript:emoticon(':cool:')"><img src="images/icon_cool.gif" border="0" alt="Cool" title="Cool"></a></td>
			  <td><a href="javascript:emoticon('')"><img src="images/icon_lol.gif" border="0" alt="Laughing" title="Laughing"></a></td>
			  <td><a href="javascript:emoticon(':x')"><img src="images/icon_mad.gif" border="0" alt="Mad" title="Mad"></a></td>
			  <td><a href="javascript:emoticon('')"><img src="images/icon_razz.gif" border="0" alt="Razz" title="Razz"></a></td>
			  </tr>
			<tr align="center" valign="middle">
			  <td><a href="javascript:emoticon(':oops:')"><img src="images/icon_redface.gif" border="0" alt="Embarassed" title="Embarassed"></a></td>
			  <td><a href="javascript:emoticon('')"><img src="images/icon_cry.gif" border="0" alt="Crying" title="Crying"></a></td>
			  <td><a href="javascript:emoticon(':evil:')"><img src="images/icon_evil.gif" border="0" alt="Evil or Very Mad" title="Evil or Very Mad"></a></td>
			  <td><a href="javascript:emoticon(':twisted:')"><img src="images/icon_twisted.gif" border="0" alt="Twisted Evil" title="Twisted Evil"></a></td>
			  <td><a href="javascript:emoticon(':roll:')"><img src="images/icon_rolleyes.gif" border="0" alt="Rolling Eyes" title="Rolling Eyes"></a></td>
			  <td><a href="javascript:emoticon(':wink:')"><img src="images/icon_wink.gif" border="0" alt="Wink" title="Wink"></a></td>
			  <td><a href="javascript:emoticon(':!:')"><img src="images/icon_exclaim.gif" border="0" alt="Exclamation" title="Exclamation"></a></td>
			  <td><a href="javascript:emoticon(':?:')"><img src="images/icon_question.gif" border="0" alt="Question" title="Question"></a></td>
			  <td><a href="javascript:emoticon('')"><img src="images/icon_idea.gif" border="0" alt="Idea" title="Idea"></a></td>
			  <td><a href="javascript:emoticon(':arrow:')"><img src="images/icon_arrow.gif" border="0" alt="Arrow" title="Arrow"></a></td>
			</tr>
</table>
</center><center>
<table width="100" border="0" cellspacing="0" cellpadding="5">
			<tr align="center" valign="middle">
			<td><input type="button" class="button" value=" Bold " style="font-weight:bold; width: 50px" onClick="javascript:bbcode('[b] [/b]')"></td>
			<td><input type="button" class="button" value=" Underline " style="font-weight:bold; width: 80px" onClick="javascript:bbcode('[u] [/u]')"></td>
			<td><input type="button" class="button" value=" Italic " style="font-weight:bold; width: 50px" onClick="javascript:bbcode('[i] [/i]')"></td>
			<td><input type="button" class="button" value=" Center " style="font-weight:bold; width: 70px" onClick="javascript:bbcode('
[center] [/center]
')"></td>
			</tr>
</table>
</center>
<!-- Smiley List Stops Here -->


<br>
<form name="post" action="add.php" method="post">
		<table border="0" cellpadding="0" cellspacing="2">
			<tr>
				<td>
					<p><b><font size="2"><?php echo $yournametxt; ?></font></b></p>
				</td>
				<td><input type="text" name="yourname" size="20"></td>
			</tr>
			<tr>
				<td>
					<p><b><font size="2"><?php echo $youremailtxt; ?></font></b></p>
				</td>
				<td><input type="text" name="youremail" size="20" value=""></td>
			</tr>
			<?php
			     if($image_verify == 1)
			     {
			       echo '<tr><td><p><b><font size="2">Verify:</font></b></p></td><td><input type="text" name="txtNumber" size="20" value=""><img src="random.php"></td></tr>';
			     }
			?>
			<tr>
				<td>
					<p><b><font size="2"><?php echo $yourMessagetxt; ?></font></b></p>
				</td>
				<td>
					<div align="right">
						<textarea name="yourmessage" cols="45" rows="10"></textarea></div>
				</td>
			</tr>
			<tr>
				<td></td>
				<td>
					<div align="right">
						<input type="submit" name="ok" value="<?php echo $submitbutton; ?>">
				</td>
			</tr>
		</table>
	</form>

</td></tr></table><!-- End of toolbar table -->


<?php
include("footer.php");
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/175721-solved-script-not-compatible-with-ie8/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.