Hi guys,
I am facing a weird problems which is i am fail to get cursor position at DIV at IE8 but work at IE7 or IE6. Can anyone tell me how to solve this problem.
Hi guys,
I am facing a weird problems which is i am fail to get cursor position at DIV at IE8 but work at IE7 or IE6. Can anyone tell me how to solve this problem.
post your code here
function getSelectionStart(o) {
if (o.createTextRange) {
var r = document.selection.createRange().duplicate();
r.moveEnd('character', o.value.length);
if (r.text == '')
return o.value.length;
return o.value.lastIndexOf(r.text);
}
else
return o.selectionStart;
}
function ChooseTag(obj1)
{
s = getSelectionStart(obj1);
obj1.innerHTML = obj1.innerHTML + obj.value;
}
o good
what means??
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.