I need to access a javascript function which is in the separate file.
Here is what I am trying to do:
in the php file I have:
var session_lang= <?php echo $_SESSION['SESS_LANGUAGE'];?>;
if (session_lang!='')
{
check_and_change(session_lang);
}
});
and I have this check_and_change() function in that separate javascript file which is of course included.
One more thing. I am getting error that there is a unknown < sign, so probably my php variable can’t be read. If someone can please check that too.
If the error line is the line with the session_lang variable, then you forgot the double qoutes (if the session_lang is a string).