added a js quick validation

This commit is contained in:
Loïc Chapeaux
2001-12-09 22:50:20 +00:00
parent d369f419c1
commit 3b3a8a5c3a

View File

@@ -129,18 +129,18 @@ h1 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo
<!-- Login form --> <!-- Login form -->
<form method="post" action="index.php3"> <form method="post" action="index.php3" name="login_form">
<table cellpadding="5"> <table cellpadding="5">
<tr> <tr>
<td align="<?php echo $cell_align; ?>"><?php echo $GLOBALS['strLogUsername']; ?>&nbsp;</td> <td align="<?php echo $cell_align; ?>"><?php echo $GLOBALS['strLogUsername']; ?>&nbsp;</td>
<td align="<?php echo $cell_align; ?>"> <td align="<?php echo $cell_align; ?>">
<input type="text" name="pma_username" value="<?php echo (isset($default_user) ? $default_user : ''); ?>" size="24" /> <input type="text" name="pma_username" value="<?php echo (isset($default_user) ? $default_user : ''); ?>" size="24" onfocus="this.select()" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td align="<?php echo $cell_align; ?>"><?php echo $GLOBALS['strLogPassword']; ?>&nbsp;</td> <td align="<?php echo $cell_align; ?>"><?php echo $GLOBALS['strLogPassword']; ?>&nbsp;</td>
<td align="<?php echo $cell_align; ?>"> <td align="<?php echo $cell_align; ?>">
<input type="text" name="pma_password" value="" size="24" /> <input type="text" name="pma_password" value="" size="24" onfocus="this.select()" />
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -196,6 +196,16 @@ h1 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo
</table> </table>
</form> </form>
</center> </center>
<script type="text/javascript" language="javascript">
var uname = document.forms['login_form'].elements['pma_username'];
var uname = document.forms['login_form'].elements['pma_password'];
if (uname.value == '') {
uname.focus();
} else {
pword.focus();
}
</script>
</body> </body>
</html> </html>