Answer the question
In order to leave comments, you need to log in
How to pass the value of a variable from method A to method B in a class?
Hello, please help me understand. Googled Googled, but never got to a working solution.
There is a class, it has 2 methods, one creates a template and displays it to the user, the second sends this template after confirmation.
That is, with the first Ajax request, we generate a template, show that if the user clicks OK, then the send method is called. And here I can’t transfer the previously generated template into it.
Of course, in the second Ajax, you can send markup from the client side, which we show to the user, but I think this is wrong. I want everything to happen on the server.
That is, the template was generated, saved to a variable, then a minute later another method was called, the template was passed to it, and the letter was sent. Can this be done?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question