Adding a '+' sign makes it a number (or NaN):
$('#b19').val(+b18 + (+b16*12) + +b15);
You should add either + or parseInt in your variable declarations at
the beginning of your script.
On Jul 30, 4:40 pm, kalyan Chatterjee
wrote:
> Hi so in this case how to write this?
>
> $('#b19').val(b18 +
YEs, as james said.
var myint = parseInt(mystring);
On Thu, Jul 30, 2009 at 9:23 PM, waseem sabjee wrote:
> 1. Do things in brackets first
> 2. Powers and Square Roots
> 3. division and multiplication
> 4. Addition and subtraction
>
> remember left to right.
>
>
> On Thu, Jul 30, 2009 at 9:21 PM
Hi so in this case how to write this?
$('#b19').val(b18 + (b16*12) + b15);
Please tell me I am got stuck with this :(
On Jul 31, 12:23 am, James wrote:
> Make sure to typecast your data from Strings to Integers/Floats before
> you do calculations on them. Otherwise, 1+1 may equal 11.
> Use the
Hi,
Please tell me how to write this. $('#b19').val(b18 + (b16*12) +
b15);
Thanks in advance
On Jul 31, 12:25 am, waseem sabjee wrote:
> if you see something like
> 1 + 1
>
> make it say
> (1 + 1)
> instead
>
> On Thu, Jul 30, 2009 at 9:24 PM, waseem sabjee wrote:
>
> > YEs, as james said.
>
if you see something like
1 + 1
make it say
(1 + 1)
instead
On Thu, Jul 30, 2009 at 9:24 PM, waseem sabjee wrote:
> YEs, as james said.
>
> var myint = parseInt(mystring);
>
>
> On Thu, Jul 30, 2009 at 9:23 PM, waseem sabjee wrote:
>
>> 1. Do things in brackets first
>> 2. Powers and Square Root
1. Do things in brackets first
2. Powers and Square Roots
3. division and multiplication
4. Addition and subtraction
remember left to right.
On Thu, Jul 30, 2009 at 9:21 PM, kalyan Chatterjee wrote:
>
> Hi I dont know can you please tell me how to it?
>
> Thanks
>
> On Jul 31, 12:20 am, waseem
Make sure to typecast your data from Strings to Integers/Floats before
you do calculations on them. Otherwise, 1+1 may equal 11.
Use the parseInt() or parseFloat() functions.
http://www.w3schools.com/jsref/jsref_parseInt.asp
http://www.w3schools.com/jsref/jsref_parseFloat.asp
On Jul 30, 9:15 am,
Hi I dont know can you please tell me how to it?
Thanks
On Jul 31, 12:20 am, waseem sabjee wrote:
> remember the golden rule
>
> BODMAs
>
> On Thu, Jul 30, 2009 at 9:15 PM, kalyan Chatterjee
> > wrote:
>
> > I am just trying to write this
>
> > $(function(){
> > $('#submit').click(funct
remember the golden rule
BODMAs
On Thu, Jul 30, 2009 at 9:15 PM, kalyan Chatterjee wrote:
>
> I am just trying to write this
>
> $(function(){
>$('#submit').click(function(){
>var b10 = $("input[name='avgtsize']").val();
>var b11 = $("input[name='avgisold']").val();
>
I am just trying to write this
$(function(){
$('#submit').click(function(){
var b10 = $("input[name='avgtsize']").val();
var b11 = $("input[name='avgisold']").val();
var b12 = $("input[name='tfee']").val();
var b13 = $("input[name='tpm']").val();
va
What??
Math science is exact...
Can you provide your script?
- Original Message -
From: "kalyan Chatterjee"
To: "jQuery (English)"
Sent: Thursday, July 30, 2009 12:32 PM
Subject: [jQuery] Simple calculation
Hi Everyone,
I am just trying to do a simple calculation - like 1440
11 matches
Mail list logo