Foros del Web » Programando para Internet » Javascript »

Ayuda con este codigo

Estas en el tema de Ayuda con este codigo en el foro de Javascript en Foros del Web. Hola Lo unico que tengo porblemas es en show list en ves de que haiga un show list necesito que la informacion al darle add ...
  #1 (permalink)  
Antiguo 15/07/2007, 22:47
 
Fecha de Ingreso: mayo-2007
Mensajes: 23
Antigüedad: 17 años
Puntos: 0
Ayuda con este codigo


Hola Lo unico que tengo porblemas es en show list en ves de que haiga un show list necesito que la informacion al darle add to list me habra un list menu y toda la informacion que entre en el textfield vaya al listmenu.

Sialguie me puede ayudar muchisimas gracias.

</head>

<body>
<BODY>

<CENTER>
<FORM name="history">

<INPUT name="command" type="text" value="">
<INPUT type="button" value="Add to List" onclick="f_store(document.history.command.value)">
<INPUT name="history" type="button" value="Show List" onclick="f_print()">
</FORM>
<P>
<SCRIPT language="JavaScript">
<!-- hide it ...
function MakeArray( n ) {
if( n <= 0 ) {
this.length = 0;
return this;
}
this.length = n;
for( var i = 1; i <= n; i++ ) {
this[ i ] = 0;
}
return this;
}
var history = new MakeArray( 15 );
var index = 0;
var cmmnd = 1;
function f_store( sTR ) {
var i;
if( index >= history.length ) {
for( i = 1; i < history.length; i++ )
history[i-1] = history[i];
index = history.length - 1;
}
history[ index ] = cmmnd + ":" + sTR;
++cmmnd;
++index;
document.history.command.value="";
}
function f_print() {
var allCmmnds, i;
allCmmnds = "";
for( i = 0; i < index; i++ )
allCmmnds += history[i] + "\n";
alert( allCmmnds );
}

</body>
</html>
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:37.