File "send.php"
Full Path: /home/analogde/www/Freebox/CHESS_ON/send.php
File size: 694 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
$variable = "calif et puis moi zoulou ...";
?>
<html>
<body>
<script type="text/javascript">
function bidule()
{
alert(document.getElementById('id_element').value);
//alert(document.formName.elements['abcName'].value);
}
</script>
<h1>Access Hidden value in JavaScript</h1>
<!--
<form name="formName">
<input type=hidden id="abcId" name="abcName"
value="Wall Street! Money Never Sleep"/>
<input type=button value="Get Value" onclick="printIt()" />
</form>
-->
<input type="hidden" id="id_element" value="<?php echo $variable; ?>" />
</body>
</html>
<?php
echo "<script> bidule(); </script>";
?>