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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:01:57+00:00 2026-06-12T22:01:57+00:00

I have two columns in html with the following markup: Column 1: <div id=uni1Query>

  • 0

I have two columns in html with the following markup:

Column 1:

<div id="uni1Query">
<p id="uni1Query1Result" data-sgvizler-chart="sText" data-sgvizler-loglevel="2"><div><p>54.7</p></div></p>
<p id="uni1Query2Result" data-sgvizler-chart="sText" data-sgvizler-loglevel="2"><div><p>34.7</p></div></p>
</div>

Column 2:

<div id="uni2Query">
<p id="uni2Query1Result" data-sgvizler-chart="sText" data-sgvizler-loglevel="2"><div><p>54.7</p></div></p>
<p id="uni1Query2Result" data-sgvizler-chart="sText" data-sgvizler-loglevel="2"><div><p>34.7</p></div></p>
</div>

What I want to do is to get the values from column 1 and compare them to same value in column 2.

So what I want is to compare the value of uni1Query1Result with uni2Query1Result and uni2Query1Result with un21Query2Result and so on. I have a third column where the results should be.

What is the best way o do this?

I tried the following:

r1 = parseInt($("#uni1Query1Result p").val());
console.log(r1);
r2 = parseInt($("#uni2Query1Result p").val());
console.log(r2);
r3 = (r1 - r2);
alert(r3);

But that results in NaN.

  • 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-12T22:01:58+00:00Added an answer on June 12, 2026 at 10:01 pm

    You can not nest block level elements within a <p> tag, browsers will close the parent <p> tag. Checking your console in Chrome will show you that.

    Also, you should use html() to find the inner value of the tag, and parseFloat to find a float number (not an integer)

    parseFloat($("#uni1Query1Result p").html())
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two div tags in single HTML with data-role as 'page'. First one
I have a two column layout: <html> <head></head> <body> <div id=container> <div id=header></div> <div
I need to have two columns inside a <div> : CURRENT HTML <div id=corpo>
I have two columns. Column E extends up to 99504 (values) and column I
I have two columns in a data frame, and I have been able to
I have two columns. ColA and ColB contains char(10) with data 20090520 and 20090521.
I have a table which has columns of data that contain status. Two example
I have a very straightforward HTML page that displays content in two columns. To
I have the following HTML table <table> <tr class=trSelected> <td>One</td> <td>two</td> </tr> </table> I
I have a two-column layout. I have a #mainContainer div that contains all of

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.