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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:32:27+00:00 2026-06-13T01:32:27+00:00

i got following line $(‘#formSelect option[value=’+ json.name + ‘]’).remove(); This deletes an option inside

  • 0

i got following line

$('#formSelect option[value="'+ json.name + '"]').remove();

This deletes an option inside a form. Which option depends on json.name.

So do you know an alternative way to do this?
Maybe something in the form like this:

var rmOption = ???
$('#formSelect rmOption').remove();
  • 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-13T01:32:28+00:00Added an answer on June 13, 2026 at 1:32 am

    Do you mean var rmOption = ‘option[value="’+ json.name + ‘"]’; $(‘#formSelect ‘ + rmOption).remove();

    @Vega Yes, i meant something like this, thanks, maybe know a nice way to integrate json.name…

    You can try setting the options var and append it inside the selector like below,

    var rmOption = 'option[value="'+ json.name + '"]';
    $('#formSelect ' + rmOption).remove();
    

    Or you can do the iterate that jQuery would be doing internally,

    $('#formSelect option').filter(function () {
        return (this.value == json.name)
    }).remove();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following script (modified to remove any private information). -- This line
I got this error on following line. $j(id).dateplustimepicker( setTime ,timeVal); Can you please help
I'm new to iOS,, I got an EXC_BAD_ACCESS exception in following line nextscrn.fullTextValue=self.fulltextFromSecond; This
I've got the following line of code in one of my Objective-C methods: if
I got the following syntax error at the following line when I run my
hey guys i got following error Undefined index: hname in C:\Temp\5Aug2010\job.php on line 38
Look at the following line of java: Mac.getInstance(HmacSHA1); If I put this in a
I've got the following line of code in my program: $('input').filter(':radio').change(function() { The problem
At the moment I got: tasklist | grep java Which delivers the following line:
I've got a wxPython app that uses the following line before creating a wx.BitmapButton:

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.