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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:42:21+00:00 2026-05-12T18:42:21+00:00

The question might not be clear, so i will explain further. I saw some

  • 0

The question might not be clear, so i will explain further.
I saw some page like wordpress new post tag, they have something like

[input] 
x tag |  x tag  |  x tag

or Facebook Notes when you post a image…

the when you input a tag and press enter, a new tag is insert in to element in the page…

I don’t quite understand how can you parse that out and then submit to the form.

if anyone know please give me an idea.

Thanks

  • 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-12T18:42:22+00:00Added an answer on May 12, 2026 at 6:42 pm

    One way is to keep track of the tags you add in a hidden form field, but actually display using divs or spans or whatever UI you want. In the case of facebook, I’d imagine they’re doing something somewhat similar, though I guess they could actually be adding form elements dynamically. Forgive the nasty code/css – just tossed it together. If you add tags and then hit submit, you’ll see the querystring that all the values are there.

    <!doctype html> 
    <html lang="en"> 
    <head>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> 
    <script type="text/javascript">
    $(function(){
        $("#btnSuggest").click(function(){
            var $tagSuggest = $("#tagSuggest");
            if($tagSuggest.val() != "")
                AddTag($tagSuggest.val());
        });
    
        $("#tagSuggest").keyup(function(e){
            if(e.keyCode == 13 && $(this).val() != "")
                AddTag($(this).val());
        });
    });
    
    function AddTag(tag){
        $("<div>").text(tag).appendTo("#tags").click(function(){
            $(this).remove();
            UpdateTags();
        }).hover(function(){
            $(this).addClass("over");
        },function(){
            $(this).removeClass("over");    
        });
    
        UpdateTags();
    }
    
    function UpdateTags(){
        var allTags = "";   
    
        $("#tags div").each(function(){
            allTags += "," + $(this).text();
        });
    
        $("#hidTags").val(allTags.substring(1));
        $("#tagSuggest").val("");
    }
    </script>
    <style type="text/css">
    .main
    {
        width: 400px; 
        padding: 10px; 
        margin: auto; 
        border: 1px solid black; 
        background-color: #e6e6e6;
        height: 600px;
    }
    
    #tags div
    {
        padding: 3px;
        border: 1px solid black; 
        background-color: #e6e6e6;
        margin: 3px;
        height: 15px;
        width: auto;
        float: left;
        cursor: pointer;
    
    }
    
    #tags div.over
    {
        background-color: red;
    }
    </style>
    </head>
    <body>
    <div class="main">
        <form action="" method="get">
            <input type="hidden" name="hidTags" id="hidTags">
    
            <textarea name="Wallpost" style="width: 390px; height: 100px;"></textarea>
            <br />
            <input type="text" id="tagSuggest" style="width: 280px;" />
            <input type="button" id="btnSuggest" value="Add Tag" style="float: right;"/>
            <br />      
            <input type="Submit" name="cmdSubmit" value="Share" style="float: right;"/> 
        </form>
        <div id="tags">
    
        </div>
    </div>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question might not seem programming related at first, but let me explain. I'm
Although my question might seem abstract I hope it's not. Suppose I develop an
This might seem like a stupid question I admit. But I'm in a small
I know the title isn't very clear. I'm new to PHP, so there might
This question might be kind of elementary, but here goes: I have a SQL
I know this question might sound a little cheesy but this is the first
Warm Standby SQL Server/Web Server This question might fall into the IT category but
This might be an interesting question. I need to test that if I can
This might be an odd question, but when I scale my image in C#
This might be a stupid question but if there's a better or proper way

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.