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

  • SEARCH
  • Home
  • 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 9210105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:59:32+00:00 2026-06-18T00:59:32+00:00

<html> <h1>MB calculator</h1> <script type=text/javascript> var level = 0; var brawlpoints = 0; var

  • 0
<html>
     <h1>MB calculator</h1>

    <script type="text/javascript">
        var level = "0";
        var brawlpoints = "0";
        var brawlenergy = "0";
        var pointsmake = "0";

        function setlv() {
            level = document.forms["form"]["lv"].value;
            alert("level = " + level);
            var maxen = 95 + (level * 5);
            var exptolv = 110 + (level * 15);
        }

        function setbpbe() {
            brawlpoints = document.forms["form"]["bp"].value;
            brawlenergy = document.forms["form"]["be"].value;
            alert("points per brawl = " + brawlpoints + "; energy per brawl = " + brawlenergy);
        }

        function pointsupdate() {
            pointsmake = document.forms["form"]["p2m"].value;
            alert("you want to make " + pointsmake);
        }

    function calculatevalues() {
        var math1 = pointsmake / brawlpoints + 1;
        var math2 = brawlenergy * math1;
        var math3 = maxen * 1.75;
        var math4 = math2 / math3 + 1;
        document.write("To achieve your goal it will take you " + math1 + " brawls, this will take you " + math2 + " energy, or " + math4 + " levels, assuming a 75% refill levels you.");
    }

</script>

<form name="form">level:
    <input type="text" name="lv" value="0">
    <br>
    <input type="button" value="update level" onclick="setlv()">
    <br>points per brawl done:
    <input type="text" name="bp" value="0">
    <br>energy per brawl done:
    <input type="text" name="be" value="0">
    <br>
    <input type="button" value="update brawl energy and points" onclick="setbpbe()">
    <br>how many points you want to make:
    <input type="text" name="p2m" value="0">
    <br>
    <input type="button" value="set points you want to make" onclick="pointsupdate()">
    <br>

    <input type="button" value="calculate" onclick="calculatevalues()">

</form>

    <h1>LV calculator</h1>

</html>

Put where the problem is in bold, for some reason that button does nothing when pushed…

So yea, test it in html, someone i know who knows some of html/javascript seems to think the form is broken or something like that…

EDIT: got it to work, how to round down in javascript if anyone reads this?
EDIT: up, not down

  • 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-18T00:59:33+00:00Added an answer on June 18, 2026 at 12:59 am

    You need to declare the maxen variable in the global scope

    var level = "0"; var brawlpoints = "0"; var brawlenergy = "0"; 
    var pointsmake = "0";
    //declare the maxen variable here
    var maxen = "0";
    
    function setlv()
    {
    //left of your code
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<html> <h1>MB calculator</h1> <script type=text/javascript> var level = 0; var brawlpoints = 0; var
<html> <head> <script> function calculate(){ var a = parseFloat(frmMain.name.value); var b = parseFloat(frmMain.Salary.value); var
This is my Jquery script $(document).ready(function() { $('#form').submit(function() { var number = $('#number').val(); $.ajax({
HTML code: <div class=clearfix style=color: #555 style=display:block; > <input type=text id=id_site placeholder=nom-du-site style=width: 245px;
html <input id=1 name=myText type=text value=20/> <input id=2 name=myText type=text value=30/> <input id=3 name=myText
HTML: <form method=post action=action=save&amp;id=239 id=save-form> <input type=text value=0 name=views /> <input type=submit value=save plz
HTML <input name=pm type=text value=0/> <input name=pm type=text value=0/> <input name=pm type=text value=0/> <input
I'm trying to make a very simple calculator in HTML and javascript But it
I am trying to make a BMI Calculator using HTML. The inputs come from
HTML <form enctype=multipart/form-data id=SubmitForm method=post action=serv.php> <input type=file name=IMG size=chars> <input type=Submit value=SAVE> </form>

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.