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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:55:59+00:00 2026-05-13T22:55:59+00:00

I am stuck with using Dojo to accomplish this. Basically what I am trying

  • 0

I am stuck with using Dojo to accomplish this. Basically what I am trying to implement is an AJAX feature where a user adds a comment to a blog post and it is immediately displayed.

So I’m to the point where I have the dojo.xhrPost receiving a chunk of html that needs to be added to the list of comments. Now I want to slowly fade in the new comment so the effect isn’t so jarring.

Here’s what I’ve got so far:

function displayNewComment(commentHtml)
{       
    //place new comment html at the end of the list
    dojo.place(commentHtml, dojo.byId('Comments'), "last");
    //is there any way to fade this in?
}
  • 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-13T22:55:59+00:00Added an answer on May 13, 2026 at 10:55 pm

    I assume that you use dojo.create to create the new node.

    In dojo.create you can set the opacity of the node to 0, so it will not show up.

    var commentHtml = dojo.create('div', { style:”opacity:0”, innerHTML: data});
    dojo.place(commentHtml, dojo.byId('Comments'), "last");
    

    or directly

    var commentHtml = dojo.create(
        'div', 
        { style:”opacity:0”, innerHTML: data}, 
        dojo.byId('Comments'), 
        "last"
    );
    

    If you build the node otherwise you just need to set opacity to 0.

    EDIT

    And of course fade it in with

    dojo.fadeIn(commentHTML, duration, easingFunc);
    

    Some more info:

    http://api.dojotoolkit.org/jsdoc/1.4/dojo.create

    http://api.dojotoolkit.org/jsdoc/1.4/dojo.fadeIn

    http://api.dojotoolkit.org/jsdoc/1.4/dojo.style

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

Sidebar

Related Questions

I am stuck using an AJAX library from about 5 years ago in this
I am attempting to use livequery. I unfortunately am stuck using jquery 1.2.6. This
I am currently stuck with this problem of displaying an image using HtmlHelper class.
I'm building some functional tests for a web site using Selenium, and I'm stuck
I'm using Oracle 10g and I'm trying to stack the conditions in a CASE
I'm using Lucene.Net in an ASP.NET application on a shared host. Got this stack
I'm using this code, and I get the stack trace that is listed below.
I'm using dojo for our UI's, and would like to load certain part of
I am (stuck) using Prototype 1.3.1 and I'm having a hard time moving from
So I've managed to get stuck using Prototype for a Project, and so far

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.