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

The Archive Base Latest Questions

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

thank you for your time. I have 2 labels with numerical values i would

  • 0

thank you for your time.

I have 2 labels with numerical values i would like to add together.

<s:Label id="cost_1" x="261" y="138" text="150" />
<s:Label id="cost_2" x="280" y="138" text="220"/>
<s:Label id="totals" x="291" y="138" text=""/>

I need to the third label (id=”totals”) to visually display the sum of first two labels. (150+220=totals.text)

Thank you!

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

    Lots of ways to do this; but given your code the simplest way would be something like this:

    <s:Label id="totals" x="291" y="138" text="{int(cost_1.text) + int(cost_2.text)}" />
    

    Although the labels may display numeric values; they are actually string values; so this code casts them to ints. From there, it’s just a simple arithmetic operation.

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

Sidebar

Related Questions

Thank you for your time, I have spent a good part of my day
Dear all: In advance, thank you for your time. Lately, I have decided to
First of all thank you for your time and sorry if some issues are
Thanks for your help! I'd like to output all companyName entries that have uploads
Hi everybody and thanks for your time, I read filenames in a QList. This
first of all thanks for taking your time! I'm a junior Dev, working with
Thank you for your interesting in my question. You can help me out from
Ok. here's the operations i successfully code so far thank's to your help: Adittion:
This one has me pretty rattled so I thank you in advance for your
I have the following magento XML code: <action method=addLink translate=label module=customer><name>myorders</name><path>chepri/myorders/customer</path><label>Standing Orders</label></action> I was

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.