SubscribeAdvertise here: Contact FM.
function quote()
{
// call me with an onmousedown event or I won't work XD
var quotetext = ';
if (window.getSelection)
{
quotetext = window.getSelection();
}
else if (document.getSelection)
{
quotetext = document.getSelection();
}
else if (document.selection)
{
quotetext = document.selection.createRange().text;
}
if (quotetext != ')
{
document.mefi.comment.value = document.mefi.comment.value + "<em>" + quotetext + "</em>";
}
}
document.mefi.comment.value += "<em>" + quotetext + "</em>"; for 30 or 40 percent less ugly and dumb.
posted by Roger Dodger at 3:55 PM on November 15, 2005