Se qualcuno mi può aiutare...mi funziona solo con Explorer, avrei bisogno che mi funzionasse anche con Mozilla...nello specifico con Mozilla non mi apre il prompt di windows...
codice:
function addTag(tagName, f) {
var txtarea = document.post.textbody;
txtarea.focus();
theSelection = false;
theSelection = document.selection.createRange().text; // Get text selection
if (theSelection) {
// Add tags around selection
document.selection.createRange().text = "<"+tagName+" href=\"http://"+theSelection+"\" target=\"_blank\">"+ theSelection + "</"+tagName+">";
txtarea.focus();
theSelection = '';
return;
storeCaret(txtarea);
} else {
var elem=f.textbody;
var what=window.alert("Inserire l'indirizzo del sito da linkare ESCLUSO http:// ");
if(what!="undefined") elem.value+=" <"+tagName+" href=\"http://"+what+"\" target=\"_blank\">"+what+"</"+tagName+">";
}
}