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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:18:49+00:00 2026-06-17T23:18:49+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 = docuent.forms["form"]["lv"].value;
alert("level = " + level);
}

var maxen = 95+(lv*5);
var exptolv = 110+(lv*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 calculate()
{
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()">
</form>

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

<h1>LV calculator</h1>

</html>

I looked through it a few times and i can’t tell what i am doing wrong…
Sorry for posting the whole thing but i couldn’t even really narrow down where the error is, i checked it up against a similar code i have that works fine, i couldn’t find a difference other then names which i was consistent with… the buttons are what aren’t working. Thanks for any help.

Javascript Output Console

Uncaught ReferenceError: calculate is not defined test.html:64
Uncaught ReferenceError: pointsupdate is not defined test.html:61
Uncaught ReferenceError: setbpbe is not defined test.html:56
Uncaught ReferenceError: setlv is not defined test.html

javascript output console while clicking each button

  • 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-17T23:18:50+00:00Added an answer on June 17, 2026 at 11:18 pm

    you are missing lots of things: like

    // lv is not defined anywhere before using here
    var maxen = 95+(lv*5);
    var exptolv = 110+(lv*15);
    

    missing concat operator here

    alert("points per brawl = " + brawlpoints + "; energy per brawl = " brawlenergy);
    

    should be

    alert("points per brawl = " + brawlpoints + "; energy per brawl = " + brawlenergy);
    

    missing closing quote here

    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.);
    

    should be

    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.");
    

    and lots more..
    Make habit of using javascript console so that you know where you went wrong with 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
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
This is my Jquery script $(document).ready(function() { $('#form').submit(function() { var number = $('#number').val(); $.ajax({
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.