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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:18:46+00:00 2026-06-09T13:18:46+00:00

Click form edit has trouble on drop down list Dropdown list shows first item.

  • 0

Click form edit has trouble on drop down list

Dropdown list shows first item. I need to select value based on <p>Professor<p/>

html

<p>Title</p>
<p class='title'>Professor</p>

JQuery

$('.title').click(function(){
    $(this).replaceWith('<select class="title" name="title"><option >Please Select</option><option value="Mr">Mr</option><option value="Mrs">Mrs</option><option value="Ms">Ms</option><option value="Miss">Miss</option><option value="Dr">Dr</option><option value="Professor">Professor</option><option value="Sir">Sir</option></select>');
});​

Demo

  • 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-09T13:18:48+00:00Added an answer on June 9, 2026 at 1:18 pm
        var theValue = $(this).html();
        $("select.title").val( theValue ).attr('selected',true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a list of records with edit links on them. When i click
I've got a form that I build when you click an edit button in
I have a form with add, edit, and save buttons. The form also has
I have jqgrid that has 23 headers. It has edit dialog with a form
I have a JQGrid which has add/edit form functionality enabled. Both are working fine.
Currently when i click on a button on my vb.net form that has a
When the user clicks an Edit button on my form, I want a box
What I am trying to do is: When you click on a form submit
is it better to do this (regarding performance, not readability...): $('a.updateCartButton').click(function() { $('form[name=updateCartForm]').attr('action', $(this).attr('href')
When I click the button and the form is valid it just refreshes the

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.