Yes, I tried what other posts said without luck. Which is why I posted
my code to see if someone would be kind enough to help. Thanks.

On Nov 16, 5:34 pm, PiotrJaniak <janiak.piot...@gmail.com> wrote:
> Hi,
>
> there is a search box in the top right of this page;)
>
> http://groups.google.com/group/jquery-en/browse_thread/thread/e819cef...
>
> On 16 Lis, 05:02, cfred <fallreco...@gmail.com> wrote:
>
>
>
> > I am having trouble rounding numbers in the code below. I would like
> > "insulBlocks" to round up to a whole number and "8Blocks", "10Blocks"
> > & "12Blocks" to round to 2 decimal places.
>
> > I've tried several things but being a newbie I'm guessing I'm just
> > putting things in the wrong place.
>
> > Thanks for reading.
>
> > $(document).ready(function(){
> >         $(":text").change(function() {
> >                 //alert(             (   (           
> > ($("#houseLength").val()*1) + ($
> > ("#houseWidth").val()*1)        )*2          ) * ($("#wallHeight").val
> > ()*1)                     );
> >                 //alert((($("#houseLength").val()*1) + 
> > ($("#houseWidth").val()*1))
> > *2) * ($("#wallHeight").val()*1);
> >                 // SET DISPLAY
> >                 //$("#totalArea").html((($("#houseLength").val()*1) + ($
> > ("#houseWidth").val()*1))*2) * ($("#wallHeight").val()*1);
> >                 $("#totalArea").html(((($("#houseLength").val()*1) + ($
> > ("#houseWidth").val()*1))*2) * ($("#wallHeight").val()*1));
> >                 $("#insulBlocks").html(parseInt($("#totalArea").html()) / 
> > .889 * 2);
>
> >                 $("#8Blocks").html(parseInt($("#insulBlocks").html()) * 
> > .25);
> >                 $("#10Blocks").html(parseInt($("#insulBlocks").html()) * 
> > .35);
> >                 $("#12Blocks").html(parseInt($("#insulBlocks").html()) * 
> > .55);
>
> >         });
>
> >         $("#clear").click(function() {
> >           $(":text").val("");
> >           $(".result").html("");
> >           $("#houseLength").focus();
> >           return false;
> >         });
>
> >         $("#quoteit").click(function() {
> >                 $("#carton").submit();
> >         });
>
> > });

Reply via email to