I am trying to place the PHP variable $e into HTML textbox id="textid" upon a button onclick. I have played around with various syntax, but I cannot seem to get it to work. What am I doing wrong?
<script type="text/javascript">
function ElementContent(id,content)
{
document.getElementById(id).value = content;
}
</script>
<input type="text" name="" value ="" id="textid" ;"/>
<?php
$e = "test";
echo '<button value="" class="button" onclick="ElementContent(\'textid\',\'$e\')" />';
?>
<button>label</button>.