Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8511155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:54:35+00:00 2026-06-11T03:54:35+00:00

I am using a Rich Textbox Plugin called FreeTextBox Demo Link for my ASP.NET

  • 0

I am using a Rich Textbox Plugin called FreeTextBox Demo Link for my ASP.NET Project and I am in need for some javascript code to clear its text on client side.

I have tried using

///------Javascript Code
function clean_designEditor()
{
    var bodyTextBox = document.getElementById("ctl00_cphContent_ftbMailBody_designEditor");
    frameDoc = bodyTextBox.contentDocument || bodyTextBox.contentWindow.document;
    frameDoc.documentElement.innerHTML = "";
}

///------ASP.NET Code
<asp:Button ID="btnPnlCloseMail" runat="server" Text="X" ToolTip="Close" onclick="btnPnlCloseMail_Click" OnClientClick="clean_designEditor();" />

It works as required, but in turn causes some javascript error to occur, thus making other AJAX and Javascript functions to break. I can’t mention the error as I am unable to get any, on the console window of Firebug or any other developer tool. And my page has a number of AJAX requesting controls and other Javascript functions, and I guess that this action is causing any issue because when I comment this above mentioned javascript lines, all the things work fine.

Can anyone suggest other way, so that it does not cause any breakdown.

I guess it is kind of a bug as my issue is quite similar to the post FreeTextBox javascript error is preventing PostBack on my DropDownList

In my case, it prevents my dropdown list to postback when I call clean_designEditor() function, otherwise it works ok. Mine is also related to AJAX popup control and Preventing Postback and other AJAX/Javascript request.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:54:37+00:00Added an answer on June 11, 2026 at 3:54 am

    You would have to use below code

    // Through id of iframe

    var iframe = frames[“MyFrame”];

    if(iframe.contentDocument) {
    doc = iframe.contentDocument;
    } else {
    doc = iframe.contentWindow.document;
    }

    doc.body.innerHTML = ”;

    Happy Coding !!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a Rich TextBox in VB.NET and passing to a StringBuilder. I
I'm writing a web-app using Python and Pylons. I need a textbox that is
I need to change the background color of some <h:inputText> controls inside a rich
I been reading on asp.net mvc learning site about JavaScript injection and man it
I put some colored text to my rich text box my using the following
I am using a rich text box to enter some variables. I am restricting
I'm using a RichTextBox (.NET WinForms 3.5) and would like to override some of
im trying to access a rich textbox on another form im using the following
I'm making a C++ code editor application using VB.NET. I'd like to change the
I am using Windows application for my project. Now I want to make some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.