This is related to another post but I thought due to the subject it deserved it's own Subject.
I have a js function defined in the <head> section.
I need to call this function from PHP is a test condition is met. I get errors when I try to do this. It says it is an undefined function.