Skip to main content

Timeline for Prerender executing twice

Current License: CC BY-SA 3.0

2 events
when toggle format what by license comment
Oct 29, 2015 at 2:00 comment added southskies I am not doubting the need to have onLoad and Postback events. The question is that my code is only used to set up variables, and does not need to run twice. So which event is it better to run in, and how to I stop it running in the duplicate event. One option is that I add a variable IFRUN into that section, which I set at the end of the execution. On second execution it sees that the variable is set and the code is not run again. Is this the best approach? Or should I be testing the value of the event (how?) and just make sure that it only executes when this event has a certain value?
Oct 22, 2015 at 6:39 history answered Leopold Lerch CC BY-SA 3.0