-->
Page 1 of 1

an 'afterload' command

PostPosted: Sun Jul 24, 2016 8:32 am
by raintime
I am not exactly sure how 'onload' works.

The documentation says:

"Optional branch to be executed any time a page is loaded from the device. This code will be executed before the page is returned but after any branches for buttons. Branch must terminate with wait command.

onload {branch label}"


So the documentation says that it will occur BEFORE the page is "returned" - which I assume means "before the page gets loaded by the browser"?

But if this is true, then I don't understand how it can also be executed "after any branches for buttons" - does that mean that it DOES NOT get executed UNTIL someone presses a button?

At any rate, I wrote a snazzy javascript file which needed to extract the id embedded in a wprint statement. But it apparently could not do that because it acted before the html portion of my Basic code had loaded, so it could not find the id.

If I understood what was happening correctly, it would be great to have, in addition to an "onload" command, an "afterload" command, which would allow a javascript file to do wonderful things with the already-loaded source Basic file.