Forum Moderators: coopster
The only way around that would be to put a cookie containing the javascript value, but PHP can't write to most browser features like Javascript can. You could have the page reload after the javascript has executed, create the cookie, then rewrite the page using the cookie value with PHP, using that to send javascript back the new value, but that would be a real pain for little gain, and lots of debugging problems.
If anyone else knows of way to do this better though I'd be interested to hear it.
<script language='JavaScript'>
function setFormContents(theForm) {
theForm.html.value=document.body.innerHTML;
return true;
}
</script>
<form action='...' method='post' onSubmit='setFormContents(this)'>
<input type='hidden' name='html' value='' />
<input type='submit' value='Send this page to PHP' />
</form>
Likewise, you could it by a link's GET if you append, but that would exceed the char limit... So it has to be by POST using this method...