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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:21:40+00:00 2026-05-20T06:21:40+00:00

It seems that the following code doesn’t print anything, while, as you can see,

  • 0

It seems that the following code doesn’t print anything, while, as you can see, it should.
Basically there are no errors reported by Firebug.

            var assign = {
                'href' : {
                    '.voteUp' : '?p=action&a=voteup&pid='+ value.PostPID,
                    '.voteDown' : '?p=action&a=votedown&pid='+ value.PostPID,
                    '.postImage a': '?p=user&uid='+ value.UserUID
                },

                'src' : {
                    '.postImage img' : value.UserImage
                },

                'html' : {
                    '.repCount' : value.PostRep,
                    '.postInfo .rep': value.UserRep,
                    '.postInfo .name': value.UserName,
                    '.postInfo .time': value.PostTime,
                    '.postMessage' : value.PostText
                }
            };

            $.each(assign, function(type, data) {
                switch (type)
                {
                    case 'html':
                        $.each(data, function(handler, value) {
                            $('#'+ value.PostPID +' '+ handler).html(value);
                        });
                    break;

                    case 'href':
                    case 'src':
                        $.each(data, function(handler, value) {
                            $('#'+ value.PostPID +' '+ handler).attr(type, value);
                        });
                    break;
                }
            });

This is part of other code, but the rest of the script works well (for example, after this code there is a function that fadeIn the contents). If you cannot find anything bad here, please comment above and i’ll add the entire script.
Thanks.

  • 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-05-20T06:21:41+00:00Added an answer on May 20, 2026 at 6:21 am

    None of the objects have a PostPID property.

    Since value represents the object referenced b html, src etc., you need to use a property in those objects, to get the proper value.

    For example:

    case 'html':
        $.each(data, function(handler, value) {
            $('#'+ value['.repCount']+' '+ handler).html(value);
        });
    break;
    

    Or perhaps you wanted the other value identifier (the source of which is not included in the question).

    In that case, rename the parameter for the $.each() handler to something else.

    case 'html':
           // renamed value paramter---v---to make the previous "value" accessible
        $.each(data, function(handler, v) {
            $('#'+ value.PostPID+' '+ handler).html(v['.repCount']);
      // original----^        "each" parameter------^
        });
    break;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code doesn't compile for obvious reasons, namely that Foo is trying to
Working through a sample in Chapter 3 of Programming in Scala, the following code
I understand that Javascript doesn't have multiple threads, but I'd like to know if
It seems that floated HTML elements don't expand the heights of their containers. For
I have the following code: var_dump($cumulitive); $y_axis_max = max($cumulitive)*1.3; var_dump($y_axis_max); It outputs the following:
To illustrate the question check the following code: class MyDescriptor(object): def __get__(self, obj, type=None):
Here is a tutorial that indicates how to combine jQuery Form Validation with reCAPTCHA.
I'm trying to use Storage mechanism in Mozilla platform (in thundebird 3.0). The following
I am having difficulty with: Listing the R packages and functions available to PostgreSQL.
The LoadIt() method below takes 5-10 seconds to complete. I want the message area

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.