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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:08:41+00:00 2026-06-12T01:08:41+00:00

Can someone tell me what I am doing wrong here: function onAjaxDone(data) { var

  • 0

Can someone tell me what I am doing wrong here:

function onAjaxDone(data) {
    var topicID;

    $('#TopicID')
        .html(data);

    topicID = store.getItem('TopicID');
    if (topicID) {
        $("#TopicID")
            .val(topicID);
        $('option[value="88"]', this).remove();
        $('option[value="99"]', this).remove();
    }
}

I get an error saying “failed strict” and pointing to the lines with “this”. What I want to do is to remove the option lines with a value of 88 and 99 for the select element with id of TopicID. Am I coding this wrong? This was an example given to me but I am not sure why the “this” is there on those two lines.

  • 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-12T01:08:42+00:00Added an answer on June 12, 2026 at 1:08 am

    This should do it:

    function onAjaxDone(data) {
        var topicID, selTopic;
    
        selTopic = $('#TopicID');
        selTopic.html(data);
    
        topicID = store.getItem('TopicID');
        if (topicID) {
            selTopic.val(topicID);
            $('option[value="88"]', selTopic).remove();
            $('option[value="99"]', selTopic).remove();
            //or
            //selTopic.val(topicID)
            //.find('option[value="88"]').remove().end()
            //.find('option[value="99"]').remove();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone please tell me what I am doing wrong here? <script type=text/javascript> (document).ready(function()
Can someone tell me what i am doing wrong here? I want the boxes
Can someone tell me what I am doing wrong here? I simplified it below
Can someone please tell me what I'm doing wrong here. I've done a post
Can someone tell me what I'm doing wrong here and how to make the
Can someone tell me what I am doing wrong here? I use this method
Please can someone tell me what im doing wrong here with respect to calling
can someone please tell what I'm doing wrong here? \newcommand{\bc}{\small\begin{verbatim}} \newcommand{\ec}{\normalsize\end{verbatim}} and then \bc
can someone tell me what i am doing wrong here.. i am not getting
Can someone tell me what I'm doing wrong here? The inner class 'tab' is

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.