This should be in a JavaScript forum dude, you might get more response there.
__________________ A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill
Please visit my sites: Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE
Oh dude i'm sorry it's me being a fool! Wasnt reading it properly. I think the problem is here:
A.
PHP Code:
if (document.layers){
lyr=document.layers[''+ID+''].document;
lyr.open();
lyr.write(WriteThis);
lyr.close();
} else if (document.all){
document.all[''+ID+''].innerHTML = WriteThis;
} else if (document.getElementById){
range = document.createRange();
element = document.getElementById(''+ID+'');
range.setStartBefore(element);
content = range.createContextualFragment(WriteThis)
while(element.hasChildNodes()) element.removeChild(element.lastChild);
element.appendChild(content);
}
B.
PHP Code:
if (document.layers){
lyr=document.layers[''+ID+''].document;
lyr.open();
lyr.write(WriteThis);
lyr.close();
}
else if (document.all){
document.all[''+ID+''].innerHTML = WriteThis;
}
else if (document.getElementById){
range = document.createRange();
element = document.getElementById(''+ID+'');
range.setStartBefore(element);
content = range.createContextualFragment(WriteThis)
while(element.hasChildNodes()) element.removeChild(element.lastChild);
element.appendChild(content);
}
}
In the B. part you need to more that last else if statement up so that it's next to the } of the previous else if.
Should sort it out
__________________ A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill
Please visit my sites: Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE
Sure man, sorry im having a bit of an off day today.
Find this in your code:
PHP Code:
else if (document.all){
document.all[''+ID+''].innerHTML = WriteThis;
}
else if (document.getElementById){
range = document.createRange();
and change it to this:
PHP Code:
else if (document.all){
document.all[''+ID+''].innerHTML = WriteThis;
} else if (document.getElementById){
range = document.createRange();
The else if needed to be moved up a line, otherwise PHP won't understand it.
__________________ A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill
Please visit my sites: Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE