PasteHTML

  •  02-29-2008, 9:45 AM

    PasteHTML

     when I use that feature using javascript and try to insert some text in url, it puts it outside of the url.
     
    eg
     
    if I type in the editor http://www.cnn.com?id=
     
    and I run code to insert our variable, it takes = sign followed by pated text out of the href tag.
     
    following is the code:
     
    Insert code for: <select id="lstCodeval">
    <option value="^^^firstname^^^">First Name
    <option value="^^^lastname^^^">Last Name
    <option value="^^^Email^^^">Email
    </select>&nbsp;<input type="button" name="btnAddCode" Value="Insert Code" onclick="insertcode()" />
    <br/>
    <%
    Dim editor
          Set editor = New CuteEditor
         
          editor.ID = "Editor1"
          editor.Text = content
          editor.FilesPath = "CuteEditor_Files"
          editor.ImageGalleryPath = "/Uploads"
          editor.MaxImageSize = 50
          editor.AutoConfigure = "Simple"
          'editor.Template= "Bold,Italic,Underline"
          
          'editor.Width = 600
          'editor.Height = 240
          editor.Draw()
    %>
     
     

    function insertcode(){
      var editor1 = obj_Editor1;
            var ddlist = document.getElementById("lstCodeval");
            var val = ddlist.options(ddlist.selectedIndex).value;
            obj_Editor.PasteHTML(val);

    }

    it works fine as long as I don't try to insert it as a part of url.
View Complete Thread