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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:14:21+00:00 2026-05-19T17:14:21+00:00

With preferably using jquery id want to update written text from input field into

  • 0

With preferably using jquery id want to update written text from input field into a div from a click of a button.

Also, when that happens id like that text to have a specific text around it that was predefined

“written text”

“AND THE PRE written text DEFINED TEXT”

On another note i was writing this as i got thinking… something like this post preview in stackoverflow wouldnt be bad either. Because its not important that the text will be shown after a click of a button. Of course.. which ever way would be easier.. thats the one i would go with…

Any ideas? I googled my ass off but i guess i couldnt find the right search words to describe sending text from input field to div with jquery…

I really have no starting point as far as the actual functions gom, but heres the inputs and divs at least.
http://jsfiddle.net/XrBy2/2/

  • 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-19T17:14:22+00:00Added an answer on May 19, 2026 at 5:14 pm

    UPDATE

        $(document).ready(function() {
    
            $('input[type=button]').click(
                function (){update(); }
            );
    
    $('input.clear').click(
            function(){
                $('div.update-here').html("");
            }     
        )
    
        });
    

    and for clear button give class clear it <input value='clear' class='clear' />

    <script src="jquery.js"></script>
    
    <script type="text/javascript">
    
        var textfront = "some pre defined text";
    
        var textend = "some pre defined text back";
    
        $(document).ready(function() {
    
            $('input[type=button]').click(
                function (){update(); }
            );
    
        });
    
        function update()
        {
            $('div.update-here').html(textfront+$('#inputform').val()+textend);
        }
    

    UPDATE change here

    $('div.update-here').html(textfront+$('#inputform').val()+textend);
    
    $('div.update-here').html(textfront+$('input[name=update]').val()+textend);
    </script>
    
    <div class="update">
      <p>Update:</p>
    
      <input type="text" name="update" id="inputform"/>
      <input type="button" value="update"/>
    </div>
    
    <div class="update-here"></div>
    
    <div style="margin: 0px;" class="example">written text</div>
    <div class="example">AND THE PRE written DETERMINED TEXT</div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Javascript, Jquery preferably, I want to be able to trigger the visiblity of
Hi again :) I'm using jQuery script to show/hide some content: <script type=text/javascript> $('.toggleButton').click(function()
Using Jquery preferably, how do I detect if an element is within the viewable
I just want a quick way (and preferably not using a while loop)of createing
How to draw triangle wave (symmetrical) using ZedGraph ? alt text http://img101.imageshack.us/img101/8482/okr20troj.jpg Preferably with
I need to send a GET request to another domain preferably using jQuery. This
Sup guys. I'm loading data into a table using ajax and jquery. This can
I want to create two DropDownList in a cascade using MVC3 (preferably Razor )
Possible Duplicate: jQuery/Javascript collision detection What would be the best way using preferably using
What is the easiest way, preferably using recursion, to find the shortest root-to-leaf path

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.