You are viewing our Forum Archives. To view or take place in current topics click here.
Need some advice on HTML
Posted:

Need some advice on HTMLPosted:

LycaN
  • Powerhouse
Status: Offline
Joined: Jan 20, 201014Year Member
Posts: 403
Reputation Power: 19
Status: Offline
Joined: Jan 20, 201014Year Member
Posts: 403
Reputation Power: 19
Hey guys,
I'm posting here because I have extremely limited experience with coding.
I'm just wondering if anyone could give me a rough idea of how hard it would be to code a 'calculator' which basically executes a series of preset calculations and then gives you an overview and the final results.

e.g.

The number 100 is input,
multiply by 1.25 (stage 1)
subtract 107 (stage 2)
subtract 10 (stage 3)
So the final result would be 8.

The 'overview' would then just display
Stage 1: 125
Stage 2: 18
Stage 3: 8

I apologize for the horrendous explanation, but it would be very appreciated if anyone who understands what I'm asking could just give me an idea of how difficult this would be.

Thank you
#2. Posted:
Nic
  • Retired Staff
Status: Offline
Joined: Jun 08, 201013Year Member
Posts: 2,466
Reputation Power: 1070
Motto: I've been watching you all day.
Motto: I've been watching you all day.
Status: Offline
Joined: Jun 08, 201013Year Member
Posts: 2,466
Reputation Power: 1070
Motto: I've been watching you all day.
If you want to stick with HTML only then you can take a look at the [ Register or Signin to view external links. ] . But notice how it is not supported by Internet Explorer, so it's not ideal if you are planning on letting other people use your calculator. If you're making it for just yourself and you don't use IE then it should get the job done just fine.

Alternatively, you can use [ Register or Signin to view external links. ] to run the calculations, or a server-side language such as [ Register or Signin to view external links. ] . JavaScript requires no additional setup (at most you might want to include the jQuery library to make things easier for yourself), whereas PHP requires a few installs on your PC (or a server that supports PHP).

The HTML output is easiest to start out with, so I suggest you give that a go. Once you have it working and have the logic in place (order of calculations) then you can give Google a go on how to run each calculation in JavaScript/PHP.
#3. Posted:
LycaN
  • Powerhouse
Status: Offline
Joined: Jan 20, 201014Year Member
Posts: 403
Reputation Power: 19
Status: Offline
Joined: Jan 20, 201014Year Member
Posts: 403
Reputation Power: 19
Nic wrote If you want to stick with HTML only then you can take a look at the [ Register or Signin to view external links. ] . But notice how it is not supported by Internet Explorer, so it's not ideal if you are planning on letting other people use your calculator. If you're making it for just yourself and you don't use IE then it should get the job done just fine.

Alternatively, you can use [ Register or Signin to view external links. ] to run the calculations, or a server-side language such as [ Register or Signin to view external links. ] . JavaScript requires no additional setup (at most you might want to include the jQuery library to make things easier for yourself), whereas PHP requires a few installs on your PC (or a server that supports PHP).

The HTML output is easiest to start out with, so I suggest you give that a go. Once you have it working and have the logic in place (order of calculations) then you can give Google a go on how to run each calculation in JavaScript/PHP.


Thanks for the in depth reply mate I really appreciate it The reason I'm looking at using HTML is because this is for an app and the thing that I'm using to build the app (as I have very limited experience/knowledge) allows me to input HTML code directly into a blank page which then shows up inside the app on my phone.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.