There is many way to do this
and
1) Use AJAX in the PHP and on every blure you can call the function whcih posting or refreshing the page.
2) user Post method and after post, in text box2 pelase added this line
.
3)use you code only and but after making some correction in that you can use in the php file because in the PHP Javascript is work like
Code: Select all
<script language="Javascript">
<!--
function autofill(valueOfObject)
{
document.getElementById("text2").value = valueOfObject;
}
-->
</script>
<body>
input type="text" id="text1" onblur="autofill(this.value)" />
<input type="text" id="text2" />
</body>
4) you can you the get methid also. refer to point 2