Here is something I tried...
<SCRIPT LANGUAGE="JavaScript">
function setVar()
{
document.frm.php_var.value='done';
document.frm.submit();
}
</SCRIPT>
<FORM ACTION="browser.php" METHOD="GET" NAME="frm">
<INPUT TYPE="HIDDEN" NAME="php_var">
</FORM>
<?
if ($php_var == '')
{
print "<script>setVar()</script>";
}
echo $php_var;
?>
in my case it is hopefully going to be used to ascertain the browser type and set some variables...this seems like a very sneaky way around though and Netscape with it 'Transfer Interrupted' message pretty much sums it up.
Is there any other way to pass on a java scipt var to php??
the code above has been compiled from ideas introduced from the forum 🙂
Regards,
Mayu