PasteHTML function creating duplicate image in IE8

Last post 01-26-2011, 2:19 AM by CrazyK. 2 replies.
Sort Posts: Previous Next
  •  01-21-2011, 6:30 AM 65821

    PasteHTML function creating duplicate image in IE8

    What i'm trying to do is select an image and insert a link through one of my custom buttons.
    Here's the button click event.
     
    function button_click()
        {
            link = document.getElementById('selected_file').innerHTML;
            editor1 = Window_GetDialogArguments(window);
            var editor = Window_GetDialogArguments(window);
            var folderName = getQuerystring('directory') + "/";
            var pid = <?php echo $propertyId ?>;
            var selected_html = getSelectedHTML();
            final_text = "<a href=\"#\" onclick = \"BLOCKED SCRIPTdata_room('../sites/" + folderName + link + "?propertyid=" + pid + "')\">" + selected_html + "</a>";
            
            
            if(selected_html != "" && link != ""){
                editor.PasteHTML(final_text);
                
            }
            window.top.close();
        }
     
     
    getSelectedHTML function returns the selected html. No problems there. I checked it using alert box. Working perfectly in Firefox and Chrome. In IE8, instead of replacing the selected html it is creating new html specified in final_text variable and keeps the old html also. Please post any solution soon or are we seen a bug in Cute Editor (using the PHP Html Editor).
     
     
  •  01-24-2011, 2:51 AM 65845 in reply to 65821

    Re: PasteHTML function creating duplicate image in IE8

    Hi CrazyK,
     
    Can you create a simple page which can reproduce this issue and send it to [email protected]? I will check it and get back to you as soon as possible.
     
    Regards,
     
    ken
  •  01-26-2011, 2:19 AM 65887 in reply to 65845

    Re: PasteHTML function creating duplicate image in IE8

    I have email you a simple php file that will illustrate my problem. Thanks. I suspect the problem is with PasteHTML().
View as RSS news feed in XML