Echo a php output within a Javascript code
I couldn't get the code below to display the success word, any idea what's
the problem with the code below?
Thanks in advance.
<script type="text/javascript">
function verification(){
var s = document.test_form.textfield.value;
if (s == "") {
alert("Please enter a value");
return false;
} else {
<?php echo "sucess"; ?>
}
}
</script>
No comments:
Post a Comment