Paste HTML thru custom dialog--Urgent

  •  12-18-2008, 12:32 PM

    Paste HTML thru custom dialog--Urgent

     
    Hi Adam,
     
    The Requirement is something like to customize the insert image button. For this I have created a custom button and on the click of thatbutton I open my custom page somethink like following.
     
     
     
     
    User gives the name of picture as shown in above fig.
    I'm creating the HTML string ImageLink  
    String ImageLink  =<img alt="alt" src="http://www.mysite.com/Myapplication/xyz/DSC00686.JPG" />
     
    On insert click the above HTML is actually converted to <img alt="alt" src="../../xyz/DSC00686.JPG"" /> in FireFox. but in IE 7.0 it is working fine.
     
    Why in Firefox http://www.mysite.com/Myapplication gets converted to "../../"?
     
     
    I need to insert the HTML string ImageLink  as it is that is
     <img alt="alt" src="http://www.mysite.com/Myapplication/xyz/DSC00686.JPG"" />
     
     
    The JS method I 'm using is on insert click is
     
     
    function button_click()
    {
     var strImageLink='<%=ImageLink %>' ;
     if(Trim(strImageLink) == "")
     {
      alert('Please insert some picture.'); return false;
     }
     var editor=Window_GetDialogArguments(window);
     editor.PasteHTML(strImageLink);
      window.top.close();
    }

View Complete Thread