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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:55:48+00:00 2026-06-18T06:55:48+00:00

Hi I tried to post data from my Text Area to DIV tag. But

  • 0

Hi I tried to post data from my Text Area to DIV tag. But its not working. Please help me out. Following is my code

<html>

<head>

<script>

function load()
{
var a=document.getElementById('txtarea').value;
var xmlhttp;
if (window.XMLHttpRequest)
  {
    xmlhttp=new XMLHttpRequest();
  }
else
  {
     xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
    xmlhttp.onreadystatechange=function()
    {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
            document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
        }
    }
xmlhttp.open("POST","one.php"+a,true);
xmlhttp.send(); 
}
</script>
</head>
<body onload="load()">
<textarea id='txtarea'>
    default
</textarea>
<div name="myDiv" id="myDiv">
    In Div Tag
</div>
</body>
</html>

one.php

<?php
echo "Hello World";
?>

In the above html file i am trying to get the value of one.php and also the text in textarea. But i am unable to get the value in text area.The xmlhttp.open(“POST”,”one.php”+a,true); Here i am doing +a to attach the value of the textarea but it is not being attached,please help with some solution

  • 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-18T06:55:49+00:00Added an answer on June 18, 2026 at 6:55 am

    URL is not properly constructed.

    xmlhttp.open("GET",""one.php?YourQueryString="+a,true);
    xmlhttp.send();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

tried uncommenting pam_limits.so from the pam.d directory but no luck. Basic PAM seems to
Usually when I get POST data it's send from a HTML form and the
I'm trying to post data from a form with insert.php as the action. However,
I had a problem getting ajax post data from django backend, I don't know
I'm trying to test a JAX-RS by doing a POST of JSON data from
I'm using a Java program to POST some XML data from a remote client
When my ajax is processed $.post(main.php, {data: $(this).text()}, function(data) { //alert(Data saved.); $('#demo').html(data); });
I tried with this code to post on the wall (Twitter) of a user
I tried to get avatar at single (post) page by these codes <?php echo
I've tried to move WCF to NetDataContractSerializer using the code in this post: http://lunaverse.wordpress.com/2007/05/09/remoting-using-wcf-and-nhibernate

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.