Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/10/2011, 07:42
fefefefe
 
Fecha de Ingreso: junio-2010
Mensajes: 128
Antigüedad: 13 años, 11 meses
Puntos: 2
Respuesta: Cambio de campo automatico

Perdon pero es muy tecnico para mi , probando este otro codigo tampoco pude,

Código:

<!-- Paste the JavaScript code between the HEAD Tags --> 

<HEAD>

<SCRIPT LANGUAGE="javascript">

<!-- This code makes the jump from textbox one to textbox two -->
function check()
{
var letters = document.joe.burns.value.length +1;
if (letters <= 4)
{document.joe.burns.focus()}
else
{document.joe.tammy.focus()}
}

<!-- This code makes the jump from textbox two to text box three -->
function check2()
{
var letters2 = document.joe.tammy.value.length +1;
if (letters2 <= 4)
{document.joe.tammy.focus()}
else
{document.joe.chloe.focus()}
}

<!-- This code makes the jump from textbox three to textbox four -->
function check3()
{
var letters3 = document.joe.chloe.value.length +1;
if (letters3 <= 4)
{document.joe.chloe.focus()}
else
{document.joe.mardi.focus()}
}

<!-- This code makes the jump from textbox four to the submit button -->
function check4()
{
var letters4 = document.joe.mardi.value.length +1;
if (letters4 <= 4)
{document.joe.mardi.focus()}
else
{document.joe.go.focus()}
}
</SCRIPT>

</HEAD>

<!-- The onLoad in the BODY tag puts focus in the first textbox -->
<BODY BGCOLOR="ffffff" onLoad="document.joe.burns.focus()">

<!-- This is the form -->
<FORM NAME="joe">
<INPUT TYPE="text" name="burns" size="10" MAXLENGTH="4" onKeyUp="check()"><BR>
<INPUT TYPE="text" name="tammy" size="10" MAXLENGTH="4" onKeyUp="check2()"><BR>
<INPUT TYPE="text" name="chloe" size="10" MAXLENGTH="4" onKeyUp="check3()"><BR>
<INPUT TYPE="text" name="mardi" size="10" MAXLENGTH="4" onKeyUp="check4()"><BR>
<INPUT TYPE="submit" VALUE="Click to Send" NAME="go">
</FORM>
que me recomiendan para salir del paso, prometo profundizar mis conocimientos en javascript