Posted by Stefan Mueller on 10/10/74 11:32
>> var MyJSVariable = <? echo $MyPHPVariable; ?>;
>> I guess that '<? echo $MyPHPVariable; ?>' gets translated to nothing
>> because
>> my PHP variable is empty at the beginning:
>
> Yeah, you are right.
> Now you have set the value for the variable, but it will only affect
> things
> that are done after this stage.
Does that mean that it's not possible to transfer a value of a PHP variable
to a JavaScript variable? The JavaScripts are defined in the header part and
at this stage all the PHP variables are empty.
Does that mean that it's not possible to do some checks while generating the
page with PHP, so I can evaluate these results within a JavaScript?
Stefan
Navigation:
[Reply to this message]
|