Re: javascript setHTML strips javascript

  •  01-30-2008, 11:21 AM

    Re: javascript setHTML strips javascript

    Hi Adam
     
    Have found a fudge that works, it may help you in debugging etc.
     
      var txtToInsert = 'This is the html and script etc to insert';
      var txt = document.getElementById('<%= editor1.ClientID %>');
     txt.SetActiveTab('code');
      txt.ExecCommand('SelectALL', false, 'SelectAll');
      txt.ExecCommand('pastetext', false, txtToInsert);
     txt.SetActiveTab('edit');
View Complete Thread