This topic is locked

update two snippets without reload the whole page

5/12/2023 2:56:02 PM
PHPRunner General questions
F
francesco author

I have a snippet that set a session variable, and I use that session variable in another snippet on same list page. Both snippets work good, but to let the second snippet working I have to reload the page.
Is there a method to run both snippets at the first load of page?

D
david22585 5/13/2023

I'm looking to do the same thing, but haven't gotten around to doing it yet. I was going to use this guide to see if it works:
https://asprunner.com/forums/topic/29627-Guide-48--Using-the-Dashboard-API-to-reload-panels-by-Ajax

Sergey Kornilov admin 5/13/2023

The best approach is to use an event like BeforeProcess and set your session variable there.
This way you will be able to use the same session variable in both code snippets.