27.12.2010, 16:13
Bueno estoy haciendo unas cosas en javascript y necesito hacer fijo unas cosas
Quiero qe en ves de qe me pregunte la IP y EL PUERTO se ponga solo desde un config
Se puede??
Gracias!
Код:
addText( 'IP del Servidor:' );
var sendLine = function( text, echo )
{
if ( !text.length )
return;
if ( initStep > 1 )
{
--initStep;
switch ( initStep )
{
case 3:
{
var colonIndex = text.indexOf( ':' );
if ( colonIndex != -1 )
{
server = encodeURIComponent( text.substr( 0, colonIndex ) );
port = encodeURIComponent( text.substr( colonIndex + 1 ) );
if ( !$.browser.msie )
{
$( 'input#console-input' )
.attr( 'type', 'password' )
;
}
addText( text + '<br />Password:' );
--initStep;
}
else
{
server = encodeURIComponent( text );
addText( text + '<br />Puerto:' );
}
break;
}
case 2:
{
port = encodeURIComponent( text );
if ( !$.browser.msie )
{
$( 'input#console-input' )
.attr( 'type', 'password' )
;
}
addText( text + '<br />Contraseсa:' );
break;
}
case 1:
{
pw = encodeURIComponent( text );
if ( !$.browser.msie )
{
$( 'input#console-input' )
.attr( 'type', 'text' )
;
}
Se puede??
Gracias!


