I have a php driven web app and I want the user to be able to select if they
wmnt to see the next page in html or PDF format with a radio button.
I wrote a funtion:
<script language="javascript" type="text/javascript">
<!--
function writeRadio() {
var a;
a = document.form1.PDF.value;
document.cookie = 'showHTML=' + a + '; expires=Thu, 2 Aug 2008 20:47:11 UTC;
'
//window.location = "http://testord.pdfkqs.local.samplelookupshow.php"
}
//-->
</script>
Then implemet it in the button:
<td>PDF<input type="radio" name="PDF" value="PDF" onclick.writeRadio()
checked>or HTML
<input type="radio" name="PDF" value="HTML" onclick.writeRadio() ></td>
but I never see the cookie set with php. What am I doing wrong?