Rina
Jul 17th, 2006, 04:16 AM
Hi all.
I try to place focus in a textfield (Sup_no) after the page get an error message. I try coding it in Javascript along in php script.
However, the code below does not function.
I hope anyone here can help me correcting the code below.
Thanks in advance.
<?php
$err = $_GET['msg'];
if ($err=='error'){
echo "<br>";
echo "<center><font face=verdana size=2 color=red><b>Supplier No already existed in database, please key in new Supplier No</b><center>";
echo "<script language='JavaScript'>";
echo "document.form2.Sup_no.focus()";
echo "return false";
echo "</script>";
}
?>
I try to place focus in a textfield (Sup_no) after the page get an error message. I try coding it in Javascript along in php script.
However, the code below does not function.
I hope anyone here can help me correcting the code below.
Thanks in advance.
<?php
$err = $_GET['msg'];
if ($err=='error'){
echo "<br>";
echo "<center><font face=verdana size=2 color=red><b>Supplier No already existed in database, please key in new Supplier No</b><center>";
echo "<script language='JavaScript'>";
echo "document.form2.Sup_no.focus()";
echo "return false";
echo "</script>";
}
?>