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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:41:23+00:00 2026-06-16T23:41:23+00:00

With reference to below question asked in stackoverflow Display clicked item I have modified

  • 0

With reference to below question asked in stackoverflow

Display clicked item

I have modified the fiddle created by john papa. Here is my updated fiddle

http://jsfiddle.net/6FCEe/31/

I have added New button and clicking on it i push new record.In click event of New button i have added below code

 this.NewDetail = function(){
    self.model.Things.push(new Thing(4, "Thing 4", self.model.CurrentDisplayThing)               
        );
    self.model.CurrentDisplayThing(item);
  };

But the new row doesnt show as higlighted. What should i do to make it highlighted. The new row added should be shown as higlighted in yellow color.

  • 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-16T23:41:25+00:00Added an answer on June 16, 2026 at 11:41 pm

    If you click on the New button you will see the following error in your browser javascript console:

    Uncaught ReferenceError: item is not defined

    Because you don’t have item in your method. In your case the item should be the newly created Thing so store it in a variable which you can name item and it will work fine.

    this.NewDetail = function(){
        var item = new Thing(4, "Thing 4", self.model.CurrentDisplayThing);
        self.model.Things.push(item);
        self.model.CurrentDisplayThing(item);
      };
    

    Here is an updated JSFIddle.

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

Sidebar

Related Questions

This is with reference to the below question: Execute program from within a C
I have a rails module included for reference below that I have included using
The answere is here, and my original question is below..... Changing the document workspace
This is in reference to a question I asked a month back . In
This question has been asked here before, but the author wasn't very clear and
Reference: I was asked this question @MS SDE interview, 3rd round. And it's not
with reference of this question Sort json array I have the following JSON String
(All of the below are simplified for brevity) I have a static reference to
Similar to this question asked on Stackoverflow, using JAXB to represent a list as
I asked the question below couple of weeks ago. Now, when reviewing my question

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.