I thought I'd post this tip on how to pass a php parameter from one web page into the javascript of another page.
I solved this problem like this:
- Pass PHP variables in the URL or Form normally.
- Using a <script language="php">, generate a div tag that contains style parameters of the passed php variables.
- Call the variables as objects of that divi tag's id.
Here is my code:
<script language="php">
echo "DIV ID = \"PHPVariables\" STYLE = "varJavaName: $varPHPpassedParam; otherJavaVar: $somePHPpassedval\"></DIV>
</script>
Then, inside my Javascript code:
varAnotherVar = PHPVariables.style.varJavaName
Hope this helps someone...