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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:43:03+00:00 2026-06-05T19:43:03+00:00

My code is somewhat like this: <?php if($_REQUEST[‘post’]) { $title=$_REQUEST[‘title’]; $body=$_REQUEST[‘body’]; echo $title.$body; }

  • 0

My code is somewhat like this:

<?php

if($_REQUEST['post'])
{
    $title=$_REQUEST['title'];
    $body=$_REQUEST['body'];
    echo $title.$body;
}
?>

<script type="text/javascript" src="texteditor.js">
</script>

<form action="" method="post">
       Title: <input type="text" name="title"/><br>

       <a id="bold" class="font-bold"> B </a> 
       <a id="italic" class="italic"> I </a>

       Post: <iframe id="textEditor" name="body"></iframe>

       <input type="submit" name="post" value="Post" />
</form>

The texteditor.js file code is:

$(document).ready(function(){
document.getElementById('textEditor').contentWindow.document.designMode="on";
document.getElementById('textEditor').contentWindow.document.close();
$("#bold").click(function(){
    if($(this).hasClass("selected")){
        $(this).removeClass("selected");
    }
    else{
        $(this).addClass("selected");
    }
    boldIt();
});

$("#italic").click(function(){
    if($(this).hasClass("selected")){
        $(this).removeClass("selected");
    }
    else{
        $(this).addClass("selected");
    }
    ItalicIt();
});


});

function boldIt(){
    var edit = document.getElementById("textEditor").contentWindow;
    edit.focus();
    edit.document.execCommand("bold", false, "");
    edit.focus();
}

function ItalicIt(){  
    var edit = document.getElementById("textEditor").contentWindow;
    edit.focus();
    edit.document.execCommand("italic", false, "");
    edit.focus();
}

function post(){
    var iframe = document.getElementById("body").contentWindow;
}

Actually I want to fetch data from this text editor (which is created using iframe and javascript) and store it in some other place. I’m not able to fetch the content that is entered in the editor (i.e. iframe).

Please help me out in this.

  • 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-05T19:43:04+00:00Added an answer on June 5, 2026 at 7:43 pm

    You can’t do that because it is not allowed.

    Javascript is not allowed access to other frames/iframes, as it would result in a security breach.

    Try to implement your editor inline in a <div></div> instead of iframe

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

Sidebar

Related Questions

I have code that's somewhat like this: ($i=0; $i < 100; $i++) { do
What's wrong with this code? I'm not able to validate 'data': $.post('http://localhost/do.php', function(data) {
I have a javascript file which has some code somewhat like this: var Slide
This is my first php script. I actually code in vb.net.. I am making
in html an rss link looks somewhat like this <a class=rsslink href=http:the_url>The feed title</a>
I have code that looks somewhat like this (less ridiculous, of course): var d
I wrote a code that looks somewhat like this: Thread t = new Thread(()
I've a code of some what like this: <div id=foo> <img src=bar.png align=right> <img
This issue is somewhat related: Problem with Code Generated by XSD.EXE: Sequence of Elements
I am somewhat new to R, and i have this piece of code which

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.