Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript JQuery Calculations

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #201950
    JoeJo
    Participant

    Hi there,

    I am developing a calculator which needs to calculate in real time (on keyup change paste)? from multiple id’s.

    Initially I want it to calculate;

    formElement5 = Backing Return /(formElement2-5/100)

    Backing Return is not a value that is displayed, however it is needed to perform the above calculation. Can it be calculated ‘in the background’ so to speak, with the answer retained to complete the afore mentioned calculation?

    The formula for Backing return is as follows:

    formElement*formElement1

    So far I have got this;

    $(‘.copyText’).val($(this).val());
    backing = Number($(‘#formElement’).val()) + Number($(‘#formElement1’).val());
    bottom = Number($(‘#formElement2’).val()-.05);
    $(‘#formElement5’).val(backing/bottom);

    But I dont think this is right as it does not give any result in JJSFiddle.

    #201960
    Paulie_D
    Member

    Perhaps you could show us the demo in Codepen or Jsfiddle?

    #201995
    JoeJo
    Participant

    http://jsfiddle.net/JoeJo/o856o13h/2/

    I have removed the non-workingJQuery.

    #201996
    Paulie_D
    Member

    I have removed the non-workingJQuery.

    It would be better if you left it in so we can check your methodology otherwise it’s like you’re asking us to write it for you…and I’m sure that’s not what you’re asking

    #201997
    JoeJo
    Participant

    No that’s not what I am asking, I have written it already, it just doesn’t work haha. And also when I add it is again, it stops another function from working, I would just like to know what is wrong with it before I enter this back into it :)

    $(‘.copyText’).val($(this).val());
    backing = Number($(‘#formElement’).val()) + Number($(‘#formElement1′).val());
    bottom = Number($(‘#formElement2′).val()-.05);
    $(‘#formElement5′).val(backing/bottom);

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.