In PHP is there a way to use document.write to set a variable in PHP.
As I am not too sure what order the scripts are run (I am assuming that PHP is executed on the server before JavaScript on the client, then again assumptions are mothers by themselfs). Please could I get some help with the following script:
<script LANGUAGE="JavaScript">
<!--
if (window.screen) {
document.write('screen.height: <?php $variable = ; ?>' + screen.height + " <?php print $variable ;?><BR>");
document.write('screen.width: ' + screen.width + "<BR>");
document.write('screen.availHeight: ' + screen.availHeight + "<BR>");
document.write('screen.availWidth: ' + screen.availWidth + "<BR>");
document.write('screen.colorDepth: ' + screen.colorDepth + "<BR>");
}
//-->
</script>
my problem comes with trying to set that variable without a page re-fresh using redirects... Of course if this is the only way then I'll have to populate a form and send over the values in a header using hidden fields filled out with the JavaScript data.
Muchos Thankos.