Joe[y]
04-28-2005, 03:57 PM
I recently noticed that internet explorer is displaying a broken template. I looked at the source and a mystery script is running :
<script language="JavaScript" type="text/javascript">
function insert_text(open, close)
{
msgfield = (document.commentform) ? document.commentform.message : document.forms[''][''];
// IE support
if (document.selection && document.selection.createRange)
{
msgfield.focus();
sel = document.selection.createRange();
sel.text = open + sel.text + close;
msgfield.focus();
}
// Moz support
else if (msgfield.selectionStart || msgfield.selectionStart == '0')
{
var startPos = msgfield.selectionStart;
var endPos = msgfield.selectionEnd;
msgfield.value = msgfield.value.substring(0, startPos) + open + msgfield.value.substring(startPos, endPos) + close + msgfield.value.substring(endPos, msgfield.value.length);
msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + close.length;
msgfield.focus();
}
// Fallback support for other browsers
else
{
msgfield.value += open + close;
msgfield.focus();
}
return;
}
-->
function lien() {
i = document.getElementById('page').liste.selectedInde x;
if (i == 0) return;
url = document.getElementById('page').liste.options[i].v alue;
parent.location.href = url;
}
</script>
This is not in any of my template files... so I have no idea what it is but the line '-->' breaks the template in IE. Is this something new to 1.4?
thanks!
<script language="JavaScript" type="text/javascript">
function insert_text(open, close)
{
msgfield = (document.commentform) ? document.commentform.message : document.forms[''][''];
// IE support
if (document.selection && document.selection.createRange)
{
msgfield.focus();
sel = document.selection.createRange();
sel.text = open + sel.text + close;
msgfield.focus();
}
// Moz support
else if (msgfield.selectionStart || msgfield.selectionStart == '0')
{
var startPos = msgfield.selectionStart;
var endPos = msgfield.selectionEnd;
msgfield.value = msgfield.value.substring(0, startPos) + open + msgfield.value.substring(startPos, endPos) + close + msgfield.value.substring(endPos, msgfield.value.length);
msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + close.length;
msgfield.focus();
}
// Fallback support for other browsers
else
{
msgfield.value += open + close;
msgfield.focus();
}
return;
}
-->
function lien() {
i = document.getElementById('page').liste.selectedInde x;
if (i == 0) return;
url = document.getElementById('page').liste.options[i].v alue;
parent.location.href = url;
}
</script>
This is not in any of my template files... so I have no idea what it is but the line '-->' breaks the template in IE. Is this something new to 1.4?
thanks!