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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:56:09+00:00 2026-06-15T07:56:09+00:00

i have this in my view: <div class=grid_12> <div class=box tabbed news id=box1> <div

  • 0

i have this in my view:

 <div class="grid_12">
<div class="box tabbed news" id="box1">
   <div class="header">
    <h3>
       <%: Model.News.Title %> 
    </h3>
  </div>
  <div class="content" id="newsItem">
    <% Html.RenderPartial("NewsItem", Model); %>
  </div> 
  <div class="clear"></div>
 </div>
 </div> <!-- End of .grid_12 -->

 <div class="clear"></div>
 <table id="table2">

 </table>
 <div class="grid_12">
 <div class="box tabbed news" id="box2">
   <div class="content" id="testdiv">
     <table id="table">
       <tr>
         <td>
           <a href="javascript:ShowReplyTextArea();" class="button">Reply</a>
         </td>
         <td>
           <a href="javascript:ReplyPost(<%: Model.News.NewsId %>);" class="button" id="post_button">Post</a>
         </td>
       </tr>
     </table>
    </div>
  </div>
</div>
<div class="clear"></div>
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
<script type="text/javascript">
 function ShowReplyTextArea() {
   div = document.getElementById('testdiv')
   textArea = document.createElement("textarea");
   textArea.setAttribute('rows', 20);
   textArea.setAttribute('cols', 149);
   textArea.setAttribute('id', "textarea");

   div.appendChild(textArea);
 }

 function ReplyPost(newsId) {
   var message = $("#textarea").text();
   if (message != null)
     $("#post_button").show();
   var jqxhr = $.getJSON("<%= Url.Action("ReplyPost", "Home", new { area = "News" }) %>?newsId=" + newsId + "&message=" + message, function (data) {
   });

   divtext = document.getElementById('table2');
   divtext.setAttribute('text', message);
 }
</script>

when i click on the reply button my text area pops up, i typed in some news and click on the post button. I need to display what i just typed underneath the grid_12 div. the textarea must then be hidden again until i click on reply again

I am struggeling to make this work. can someone help please?

  • 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-15T07:56:10+00:00Added an answer on June 15, 2026 at 7:56 am

    Add some div to display value and use jQuery in MVC3 you can use jQuery out of the box.
    When you use $(“#id”) you select item by id, much like getElementById but it is wrapped set of jQuery with which you can do much more than selecting it normally.

    new div for displaing

    <div id="displayArea"></div>
    

    some jQuery code to put in onClick:

    $("#textArea").hide();
    $("#displayArea").innerText = $("#textArea").val();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this html: <div class=speaker-list> <div class=view-content> <div class=views-row views-row-1 views-row-odd views-row-first> <div
How can I achieve this view with CSS: ------------------TITLE or TITLE------------------ I have <div
I have this code in my view <a href=#SampleEditor onclick=javaScript:ShowSampleEditor() id=SampleLink>Add Sample</a> <div class=editor-field
I have this partial view rendered multiple times on a page: @model POS.Domain.Entities.Category <div
I have this view @model IEnumerable<ViewModelRound2> ... <snip> ... @{ using (Html.BeginForm(new { round1Ring3Bids
I have this view (DetailsContainer, first class in code section of this question) with
I have this Haml view: !!! strict %html{:xmlns => http://www.w3.org/1999/xhtml} %head %meta{:content => text/html;
I have this class: class View(object): def main_page(self, extra_placeholders = None): file = '/media/Shared/sites/www/subdomains/pypular/static/layout.tmpl'
I have this attribute in my view model: [CustomRequired, EmailRegex] [Display(Name = KeepInformedPersonMail, ResourceType
I have this grid.. <tr> <td class=TDCaption style=text-align: <div class=DivStyleWithScroll style=width: 100%; overflow: scroll;

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.