I have a condition in php based on some session variables. If condition passes, I want to call a Javascript function which is updating my current webpage. Is it possible to place such a call to Javascript function independent of a button or a link or the window load function?
Share
If I am understanding you correctly, just use php to output the javascript function. It will fire once, if you need.
Or, you could echo out the session variables as javascript variables in the same way, and then do the conditional check in javascript.