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 7975477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:39:02+00:00 2026-06-04T08:39:02+00:00

I have this tinymce text area which is using Ajax to call it and

  • 0

I have this tinymce text area which is using Ajax to call it and call the content from the database

<form class="form">
    <table cellspacing="20">
        <tr>
            <td>
                <label>Select Page :</label>
            </td>
            <td>
                <select name="cms" id="cms" onchange="page_get_content(this.options[selectedIndex].value);">
                    <option value="">Select Page to be edited</option>
                    <option value="3">Home Page</option>
                    <option value="1">About us</option>
                    <option value="2">Agents</option>
                </select>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <div id="content" style="display: none;">
                    <textarea id="newsdesc" name="content"></textarea>
                </div>
            </td>
        </tr>
    </table>
</form>

Here is the JavaScript that calls it

function page_get_content(id) {
    if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
    } else {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange = function () {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            document.getElementById('content').style.display = "block";
            document.getElementById('newsdesc').innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.open('GET', 'forms/cms_get.php?page_id=' + id, true);
    xmlhttp.send();
}

And here is the cms_get.php:

<?php
$page_id = $_GET['page_id'];
if(!empty($page_id)){
    $cms = new CMS();
    $page = $cms -> find_by_id($page_id);
    if($page) {
?>
<?php echo $page -> content; ?>
<?php 
    } 
} 
?>

Everything is working fine but the tinymce is loading empty, and when i inspect the element with fire bug i get my text area but it is hidden and i tried to display it as block it is showing me the regular html text area my point is i want to show it with the contents in it

  • 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-04T08:39:04+00:00Added an answer on June 4, 2026 at 8:39 am

    Don’t edit the .innerHTML, rather use tinyMCE.get(id).setContent(text);

    More info: http://www.tinymce.com/wiki.php/API3:method.tinymce.Editor.setContent

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

Sidebar

Related Questions

I have a textarea which is a tinymce editor. This text area contains html.
i am using tinymce to make rich text area input and i have a
I have this from tinymce and i called it before calling jquery.. <script type=text/javascript
I have this plugin advImage which I use in tinyMce. I want the user
Oh hai I have an ajax request, which works way: request starts: tinyMCE gets
I currently have a PrintingWebService that I call from an AJAX page with all
I have a tinyMCE editor which uses the advanced theme. I am using the
I have set up a form using TinyMCE in my MVC website. To do
I have an HTML form which contains a drop down, a tinyMCE textarea, and
I am using tinymce, I have multiple text areas on my page. Is it

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.