Jump to content

Javascript carry the variable over to next page


chanveil

Recommended Posts

I am building a calorie counter/calculator and I am stuck on carrying the variable over so that it accumulates total value (java/ajax).So if you click on the letter A you will get a list of foods in the A group and as you modify the form you will increase your caloric value. If you choose a new food group the value is zero'd out.I need the counter to accumulate all choices from all food options. any ideas?I am a PHP coder and very very new to java and ajax.FYI when you click on a letter, it calls (ajax) a .php script that generates the table based on the MySQL database.

Link to comment
Share on other sites

FYI when you click on a letter, it calls (ajax) a .php script that generates the table based on the MySQL database.
So the page never refreshes then? If that is the case you should be able to just have a global variable that gets updated when the user adds a new food to their list.BTW, it's JavaScript not Java. (The two are entirely different languages)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...