Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/07/2007, 22:47
2pac1
 
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>