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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:02:14+00:00 2026-06-13T13:02:14+00:00

I read through several threads without find a clear answer. I’m using a JavaScript

  • 0

I read through several threads without find a clear answer.
I’m using a JavaScript library (Drinks.js) to put several widgets on my webpage.
The following code will add one single item to my div element pnlThermo:

function create(item) { 
    var thermo = Drinks.createElement('display');
    thermo.setAttribute('id', item);
    thermo.setAttribute('label', item);
    Drinks.appendChild('pnlThermo', thermo);         
} 

Well, now I want to add several items to the same div element. No matter if I use a for cycle or call the function explicitly only the first item will be rendered. For example:

create('T1');
create('T2');
create('T3');

leads to show T1 only.
Perhaps I missed something, I’m quite new to JavaScript programming.

Thanks in advanced.

  • 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-13T13:02:15+00:00Added an answer on June 13, 2026 at 1:02 pm

    The reference manual ( http://goincompany.com/DTManual01.pdf ) says :

    After you have created the HTML element, you have to append it to an
    HTML container. In order to do this you have to use the appendChild
    function, provided by the Drinks class. Drinks.appendChild(‘body’,
    gauge); ‘body’ is the id of the HTML container. If the parent is an
    instrument, this function doesn’t work. We have to use the appendChild
    method of the instrument, but we’ll see this later.

    Seems to imply that the first parameter needs to be an HTML tagname, which makes little sense
    but then the library is a little wierd IMHO.

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

Sidebar

Related Questions

I have read through several articles which are alternatives to using setpixel/getpixel but I
After reading through several Q/A, I still can't find a suitable answer for my
I read through the javadoc and couldn't find anything that resembles it.
Had a good read through similar topics but I can't quite a) find one
I've read through RFC 2617 and can't find there or anywhere else what the
I read through several questions similar to this one before posting, but did not
I know there are several estimating questions here, and I have read through most
I have read several threads about memory issues in R and I can't seem
I have read through several reviews on Amazon and some books seem outdated. I
Through several threads I can see that the use of the MVC antiforgery token

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.