Spoon
07-25-2002, 02:52 PM
Hi guys,
I cant seem to get this thing to work. What i want to do is have javascript open a window with smiley images. Then i want the user to click on an image and when he/she does the window closes and the img src is passed back to an iframe on the main page. The name of the iframe is isContent.
Here is the code i have on the page that has the iframe...
function smiley()
{
smiley_img = showModalDialog("pop_rte_smiles.asp","","font-family:Verdana; font-size:12; dialogWidth:30em; dialogHeight:34em" );
if (smiley_img) {
idContent.document.focus();
var sel = idContent.document.selection.createRange();
sel.pasteHTML(smiley_img);
}
}
and here is the code i have on the pop up smiley page
<script language="Javascript">
function insertsmilie(){
var img = window.event.srcElement
var src = img.src;
window.returnvalue= '<IMG border="0" align="absmiddle" src="' + src + '">';
window.close();
}
</script>
Can someone please tell me how to fix it. What happens is the pop up opens, i click on a image, the window closes but nothing is passed to the iframe. PLZZZZ help :)
Regards,
Spoon
I cant seem to get this thing to work. What i want to do is have javascript open a window with smiley images. Then i want the user to click on an image and when he/she does the window closes and the img src is passed back to an iframe on the main page. The name of the iframe is isContent.
Here is the code i have on the page that has the iframe...
function smiley()
{
smiley_img = showModalDialog("pop_rte_smiles.asp","","font-family:Verdana; font-size:12; dialogWidth:30em; dialogHeight:34em" );
if (smiley_img) {
idContent.document.focus();
var sel = idContent.document.selection.createRange();
sel.pasteHTML(smiley_img);
}
}
and here is the code i have on the pop up smiley page
<script language="Javascript">
function insertsmilie(){
var img = window.event.srcElement
var src = img.src;
window.returnvalue= '<IMG border="0" align="absmiddle" src="' + src + '">';
window.close();
}
</script>
Can someone please tell me how to fix it. What happens is the pop up opens, i click on a image, the window closes but nothing is passed to the iframe. PLZZZZ help :)
Regards,
Spoon