Personalizaci�n de la gu�a de aprendizaje de plantillas HTML

JavaScript en report.html para el Paso 14

<SCRIPT LANGUAGE="JavaScript">
var astrParms ;
var astrItems ;
var strValue ;

var strInput = window.location.search.substring(1)
document.write( "<h3> Resultados de procesar mediante report.html: </h3>" ) ;
<!-- document.write( strInput + "<br>") ; -->

if ( ( strInput != null ) && ( strInput.length > 1 ) )
{
<!-- Divida los argumentos entre s� -->
astrParms = strInput.split( '&' ) ;

<!-- Nombre de proceso -->
astrItems = astrParms[ 0 ].split( '=' ) ;
strValue = astrItems[ 1 ] ;
strValue = strValue.replace( '+', " " ) ;
document.write( "<h4>El nombre es: </h4>" ) ;
if ( strValue.length== 0 )
{
document.write( "Missing!" );
}
else
{
document.write( strValue ) ;
}

<!-- ID de empleado de proceso -->
astrItems = astrParms[ 1 ].split( '=' ) ;
strValue = astrItems[ 1 ] ;
strValue = strValue.replace( '+', " " ) ;
document.write( "<h4>El ID de empleado es: </h4>" ) ;
if ( strValue.length== 0 )
{
document.write( "Missing!" );
}
else
{
document.write( strValue ) ;
}

<!-- SO de proceso -->
astrItems = astrParms[ 2 ].split( '=' ) ;
strValue = replaceChars( astrItems[ 1 ] ) ;
document.write( "<h4>El SO del usuario es: </h4>" ) ;
document.write( strValue ) ;

<!-- Informe de proceso -->
astrItems = astrParms[ 3 ].split( '=' ) ;
strValue = replaceChars( astrItems[ 1 ] ) ;
document.write( "<h4>El texto de informe de problema es: </h4>" ) ;
if ( strValue.length <= 0 )
{
document.write( "Missing!" );
}
else
{
document.write( strValue ) ;
}
}
else
{
document.write( "La serie de entrada estaba vac�a" ) ;
}

document.write( "<br><br><hr>" ) ;
document.write( "<h3> Vuelva ahora a la p�gina anterior </h3>" ) ;

function replaceChars( strInput )
{
var strTmp = strInput ;
strTmp = replaceCh( strTmp, "+" ) ;
strTmp = replaceCh( strTmp, "%0D" );
strTmp = replaceCh( strTmp, "%0A" );

return strTmp ;
}

function replaceCh( strInput, strChar )
{
var i;
var strTmp = strInput ;

for ( i = 0; i < 1024; i++ )
{
if ( strTmp.indexOf( strChar ) != -1 )
{
strTmp = strTmp.replace( strChar, " " ) ;
}
else
{
break;
}
}
return strTmp ;
}

</SCRIPT>