guitardave78
Programmer
I have this in IE and would like a way of doing it if it is firefox ![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
}...the bane of my life!
Code:
function getSel(tag,id)
{
if(document.all){
var str = document.selection.createRange().text;
document.getElementById(id).focus();
var sel = document.selection.createRange();
sel.text = "<" + tag + ">" + str + "</" + tag + ">";
}else{
alert("Only works in IE!!!")
}
}
}...the bane of my life!