hvorfor virker det ikke?
index.html:<html>
<head>
<title>Lord Of The Danes Homepage: ".$title."</title>
<link rel='stylesheet' type='text/css' href='../design/stylesheet.css'>
<SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"JavaScript\" SRC=\"/../design/display.js\"></SCRIPT>
</head>
display.js:
function vote_close(id) {
vc = document.getElementById("vote_close_" + id);
vo = document.getElementById("vote_open_" + id);
vc.style.display = "block";
vo.style.display = "none";
}
function vote_open(id) {
vc = document.getElementById("vote_close_" + id);
vo = document.getElementById("vote_open_" + id);
vc.style.display = "none";
vo.style.display = "block";
}
function strInsert(input_str,insert_str,insert_position) {
return input_str.substring(0,insert_position)+insert_str+input_str.substr(insert_position);
}
var fokus = false;
var cursorpos;
function insertSmiley(frmElm,smiley) {
if (frmElm.selectionEnd != undefined) {cursorpos=frmElm.selectionEnd+smiley.length;frmElm.value = strInsert(frmElm.value,smiley,frmElm.selectionEnd);}
else if (document.selection && fokus) {r = document.selection.createRange();r.text = smiley;}
else if (document.selection == undefined) frmElm.value += smiley;
else;
}
function mozPlaceCursor(frmElm)
{
if (frmElm.selectionEnd != undefined && cursorpos != undefined)
{
frmElm.setSelectionRange(cursorpos,cursorpos);
}
}
ingen af disse script virker når de ligger i dislpay.ja filen, men når de ligger i index.html så virker det. hvorfor?