Hi!
i’ve to work on another programmer script and i’m not very good in javascript so i need help.
I want to put an image link into a textfield. When i push a button, a popup window that contain all the image from a specific image folder open and when i click on one of these image it run that script:
function insertImgCalendar()
{
url = “wcmImageNew.asp”;
r = windowOpenSize(url, l,”,’s’,420,575,50,50)
if (r)
{
// Create a IMG Tag to enbed the table
var img=document.createElement(‘img’);
var newAttr = document.createAttribute(“src”)
newAttr.nodeValue=r
img.setAttributeNode(newAttr);
var newAttr = document.createAttribute(“border”)
newAttr.nodeValue=”0″
img.setAttributeNode(newAttr);
var sel = document.selection;
if (sel!=null)
{
var selRange = sel.createRange().text;
var rng = sel.createRange();
if (rng!=null)
{
rng.pasteHTML(img.innerHTML);
}
}
}// end if retrun from TableWizard
[U]document.frmUser.Img_Sponsor.value = …;
}
the underline part is what i’m trying to do… i guest that rng value will be the value i need but when i write = rng i’ve got OBJECT in my textfield?
Please help!