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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:40:10+00:00 2026-06-06T10:40:10+00:00

I know this is very basic. I would like to use jQuery to change

  • 0

I know this is very basic.
I would like to use jQuery to change the label of a drop down field which was generated by Django.

Here is the HTML code:

<div class="form-fields">
<table>
<tr><th><label for="id_Ap_m">Application method 1:</label></th><td><select name="Ap_m" id="id_Ap_m">
<option value="" selected="selected">Select an application method</option>
<option value="1">Aerial</option>
<option value="2">Ground Sprayer</option>
</select></td></tr>
</table>
</div>

jQuery code:

$(document).ready(function(){
    $('#id_Ap_m').html('New application');
});

My aim is to change ‘Application method 1’ to ‘New application’. My approach is to select this label based on its id then change the text. However, my code does not work. It could because both the label and dropdown list have the same id (id_Ap_m), which was generated by Django.

Any suggestions?

  • 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-06T10:40:11+00:00Added an answer on June 6, 2026 at 10:40 am

    Your label has no id, did you try this?

    $("label[for='id_Ap_m']").html('New application');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is very basic CSS. How do I keep the span contained
guys I know this question is very basic but I've met in few publications
Ok, I know this is a very basic question, but my head is swimming
This is a very very basic question and I know one way is to
This could be a very basic problem, but I sort of don't know SQL
I know, this might be a very basic question but I am not 100%
I use BitKeeper at work, and I would like to have a basic code
This may seem like a very basic question but I did not seem to
I know this is very stupid question, but I wanted to clarify this. Let's
I know this is very evil, but is it possible to add an object

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.