Hola, tengo un problema con estos scripts:
Código PHP:
function meter2(text) {
var postopic = document.form1.prenoti;
if (postopic.createTextRange && postopic.caretPos) {
var caretPos = postopic.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?
text + ' ' : text;
}
else postopic.value += text;
postopic.focus(caretPos)
}
function storeCaret(text) {
if (text.createTextRange) {
text.caretPos = document.selection.createRange().duplicate();
}
}
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
countfield.value = maxlimit - field.value.length;
}
que se ejecutan en esta textarea:
Código PHP:
<textarea
onKeyDown="textCounter(this.form.Message,this.form.remLen,2000);"
onKeyUp="javascript:storeCaret(this);
textCounter(this.form.Message,this.form.remLen,2000);" name="prenoti"
onchange="javascript:storeCaret(this);"
onclick="javascript:storeCaret(this);" rows="15" wrap="VIRTUAL" cols="70" id="prenoti"></textarea>
El caso es que en INTERNET EXPLORER si funcionan, pero en firefox y google c. no va.
Ayuda please!!
gracias