Jump to content

Small Javascript Code


Selacius

Recommended Posts

I am looking for some information as to where I could start on the script I am trying to write. I am looking for one that can dynamically add or subtract numbers via a click of a button, without refreshing the page. And once these numbers have been added or subtracted, another value gets changed in the process. Then once this is all done with the user can press a final button to have it be inserted into a database along with other information from standard html forms.Any help as to where I could start and what I'd be looking for would be appreciated.

Link to comment
Share on other sites

SOrry for not including it, but yes I'd be using PHP as well for the code. The rest of the page will be in PHP, but this small section of addition, etc will be in javascript to limit the amount of reloading that happens.

Link to comment
Share on other sites

You could do a form with an action as a php page, and in the php page get the values of the numbers, do whatever you need to with them, and then insert them.

Link to comment
Share on other sites

Yes well that is what I am intending to do for my other none numerical data needed. Its just for this set of numbers and such I would like to create a script which can add/subtract them from a base number and in doing so change a different value. I know I can do it with php and just use forms but in order for the user to determine which number setup is best for him/her it would require a lot of refreshing.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...