peppe
12-01-2003, 10:03 AM
Hi
Can somebody hel me with this function how to make or put target_blank is that posible with this function?
function HTMLEditor_setCustomURL(inputBox)
{
var str = inputBox.value;
tar = "";
if ((str!=null) && (str!="http://") && (str!=""))
{
if (this.htmlEditor.DOM.selection.type=="None")
{
var sel=this.htmlEditor.DOM.selection.createRange();
sel.pasteHTML("<a href=\""+str+"\""+tar+">"+inputBox[inputBox.selectedIndex].text+"</a>");
sel.select();
}
else //format1("CreateLink", str);
{
//opener.editor.execCommand("CreateLink", '', str);
var sel=this.htmlEditor.DOM.selection.createRange();
sel.pasteHTML("<A HREF=\""+str+"\""+tar+">"+sel.text+"</A>");
sel.select();
}
}
}
Thanx
Can somebody hel me with this function how to make or put target_blank is that posible with this function?
function HTMLEditor_setCustomURL(inputBox)
{
var str = inputBox.value;
tar = "";
if ((str!=null) && (str!="http://") && (str!=""))
{
if (this.htmlEditor.DOM.selection.type=="None")
{
var sel=this.htmlEditor.DOM.selection.createRange();
sel.pasteHTML("<a href=\""+str+"\""+tar+">"+inputBox[inputBox.selectedIndex].text+"</a>");
sel.select();
}
else //format1("CreateLink", str);
{
//opener.editor.execCommand("CreateLink", '', str);
var sel=this.htmlEditor.DOM.selection.createRange();
sel.pasteHTML("<A HREF=\""+str+"\""+tar+">"+sel.text+"</A>");
sel.select();
}
}
}
Thanx