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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:35:58+00:00 2026-05-27T20:35:58+00:00

Im trying do display my body onload in a div tag, but cant solve

  • 0

Im trying do display my body onload in a div tag, but cant solve it ? Can It be because I have 3 function in my javascript ?

When Im using a simple form, it works like a charm. But I dont want the form, just it to be displayed in a Div tag.

Thanks for al the help youre giving me here 🙂

this is my script

<script language="javascript" type="text/javascript">
<!-- 
// Get the HTTP Object
function getHTTPObject(){
   if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP");
   else if (window.XMLHttpRequest) return new XMLHttpRequest();
   else {
      alert("Your browser does not support AJAX.");
      return null;

   }
}    
// Change the value of the outputText field
function setOutput(){
    if(httpObject.readyState == 4){
        document.getElementById('outputText').value = httpObject.responseText;
    }

} 
// Implement business logic    
function doWork(){    
    httpObject = getHTTPObject();
    if (httpObject != null) {
        httpObject.open("GET", "rss.php?rssFeed="
                        +document.getElementById('inputText').value, true);
        httpObject.send(null); 
        httpObject.onreadystatechange = setOutput;
    }

}

var httpObject = null;

//-->

</script>

This is the code im using for displaying.

The thing is that I do not want to use input type or textarea. since i get a border around the displaying text.

I just want it to look like plain text. not textfields.

<body onload="doWork()">
<div id="page-wrap">
<h1> Dagens ordspråk</h1>

<div id="myDiv">
<input type="hidden"  onclick="doWork();" name="inputText" id="inputText"/> 
<textarea name="outputText" id="outputText" cols="50" rows="20"></
</textarea>
</div>
</div>
  • 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-05-27T20:35:59+00:00Added an answer on May 27, 2026 at 8:35 pm

    Change

    document.getElementById('outputText').value = httpObject.responseText;
    

    to

    document.getElementById('outputText').innerHTML= httpObject.responseText;
    

    And you can convert your textarea to a div to hold the results now..

    <div id="outputText"></div>
    

    Alternatively you can style the textarea and input to not have a border..

    <style type="text/css">
       textarea{ border: 0;}
    </style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<body onload=document.getElementById('menuTest').style.removeAttribute('display')> This is the code I'm using. Basically I'm trying to make an
I've been trying to display text using a Quartz context, but no matter what
I'm trying to understand this bit of code: in display.php: <html> ... <body> <table>
Trying to display current time with PHP (using this ): $date = date('m/d/Y h:i:s
Im trying to display the image i have coming from an intent.putExtra on a
I'm trying to display a modal form using jquery ui. I've adapted an example
I have a problem with my XML that I am trying to display on
Im trying to display hyperlinks (formated as hyperlink) in a listview row but not
I'm trying to display the right value of a div named slider, displaying it
I am trying to display a modal Javascript dialog box in Chrome when a

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.