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

  • Home
  • SEARCH
  • 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 8312879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:18:24+00:00 2026-06-08T20:18:24+00:00

What I am trying to do is replicate a form interaction experience I have

  • 0

What I am trying to do is replicate a form interaction experience I have seen somewhere before…

When you click on ‘text’ it becomes a text field for the user to edit the text.

label: text (click) label: input[text]. Then blah.change(){ submit };

$('#basicinfo div').click(function(){
    $('#basicinfo select').hide();
    $('#basicinfo div').show();
    $(this).hide();
    $(this).siblings('select').show();
});
$('#basicinfo select').blur(function(){
    $('#basicinfo select').hide();
    $('#basicinfo div').show();
});
$('#basicinfo select').change(function(){
    $(this).siblings('div').html(***$(this).text()***);
    $('#basicinfo').submit();
});

<form id="basicinfo">
    <label>Gender</label> <div>Male</div>
    <select name="1">
        <option value="1">Male</option>
        <option value="2">Female</option>
    </select>
    <label>Age</label> <div>23years</div>
    <select name="2">
        <option value="21">21 years</option>
        <option value="22">22 years</option>
        <option value="23">23 years</option>
    </select>
</form>

Using .val() or .text() haven’t worked, hopefully someone will know what I need 🙂

PS. I tried $(this+” option:selected”).text() but didn’t work.

  • 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-08T20:18:25+00:00Added an answer on June 8, 2026 at 8:18 pm

    PS. I tried $(this+” option:selected”).text() but didn’t work

    this is an object and not a string. try

    $(this).find('option:selected').text()
    

    Also I don’t know if and when the blur event gets triggered in different browsers but I imagine it’s inconsistent.

    I personally would use seperate “confirm” and “cancel” buttons so the user can decide when to save or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to replicate an effect as seen on http://www.fiat.co.uk/Showroom/#showroom/punto_evo/explore . I have made
Here is what I have to replicate: curl --basic --user testuser:testuser --form xml=@newdoc.xml --form
I am trying to replicate the text overlay effect that occurs when you mouse
So I am trying to replicate Facebook's picture tagging functionality, and I have the
I have a workflow(on svn) which I am trying to replicate with git, but
I have form where a particular field requires both server side and client side
I am trying to perform input validation on a user click. However the jQuery
I am trying to replicate, with my own code, the history-sniffing demo seen on
I am trying to replicate a page I have been given, and I have
I'm trying to replicate the functionality i've seen on a couple of sites: http://todaslistas.heroku.com

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.