Search the Community
Showing results for tags 'return value'.
-
BACKGROUND: I have a javascript document that is dynamically loaded when a certain condition is met. In this document there are two functions: the first function is called submitForm(), and the second is called resetForm(). Each of these functions is triggered separately by a different button on the same HTML webpage. Both functions rely on the same PHP class, but each relies on data created by a different instance containing different data. The first instance is created at run time and is ultimately read into the submitForm() function. The second instance is created at the visitor's discretion via an AJAX call that is made when the resetForm() function is triggered. The success function of the AJAX call made by the resetForm() function generates a value needed by the submitForm() function when it is run for a second time after the resetForm() function has already been called once. QUESTION: How do I get the resetForm() function to return a value generated by its AJAX call's success function in a manner that it can be used by the submitForm() function? Sorry, no code, as the whole process is even a little more complicated than what has just been explained.. Please advise. Roddy
- 4 replies
-
- ajax
- success function
-
(and 1 more)
Tagged with: