Bienvenido: ( Identificarse | Registrarse )      
Foros de Trucos Windows
 
Closed TopicStart new topicStart Poll

Outline · [ Estándar ] · Lineal+

> Ayuda a decifrar Java Script, necesito q me expliquen este codigo

edgaruhc
post Sep 8 2007, 08:03 PM
Publicado: #1


Miembro Avanzado
***

Grupo: Members
Mensajes: 57
Registrado: 27-September 06
Miembro nº: 181.946



Hola me gustaria que alguien me explicara el siguiente codigo, es un java.script supongo y al ultimo un HTML

El motivo es que en mi empleo, me cuestionaron sobre el, y para el lunes tengo que explicar mas o menos de que trata esta codificacion o mas o menos que es lo que hace

Espero y no sea mucha molestia y me puedan ayudar.

Aqui esta el codigo




TopicUtils.js



var APIWin = returnAPIWin();

if (APIWin == null)

{

open("../APIError.htm", "_self");

}

function getItemStatus(id)

{

retval = APIWin.LMSInitialize();

retval = APIWin.LMSSetValue("cmi.objectives.0.id", id);

retval_item = APIWin.LMSGetValue("cmi.objectives.0.status.0");

retval = APIWin.LMSFinish();

return retval_item;

}

function doOnUnload(id,status)

{

if (APIWin != null){

var totalTime = calculateTotalTime();

retval = APIWin.LMSInitialize();

retval = APIWin.LMSSetValue("cmi.objectives.0.id", id);

retval = APIWin.LMSSetValue("cmi.objectives.0.mastery_time", parseInt(totalTime));

if (getItemStatus(id)!="completed")

retval = APIWin.LMSSetValue("cmi.objectives.0.status.0", status);

retval = APIWin.LMSFinish();

}

}

// ********************************************************************************
************************

<HTML>

<HEAD>

<TITLE>Introduccion</TITLE>

<!-- this script make course compatible with IMS -->

<script language="JavaScript" src="../../scripts/ims.js"></script>

<script language="JavaScript" src="../../scripts/calculateTime.js"> </script>

<script language="JavaScript" src="../../scripts/topicUtils.js"></script>

<script language="JavaScript" src="../../scripts/AC_RunActiveContent.js"></script>



<script language="javascript">

var szParentReload = false;



function window_onunload()

{

if (szParentReload == true)

this.top.opener.location.reload(true);

}



function U3P_intro_DoFSCommand(command, args)

{

if (command=="assessment") {

//add raw score each time student clicks one answer

aArgs = args.split("_");

iActualScore = parseInt(aArgs[0]);

iMaxScore = aArgs[1];

}



if (command=="exit") {

if (confirm("Do you really want to exit this course?"))

{

szParentReload = true;

this.top.close();

}

}

}

</script>

<script language="vbscript">

Sub U3P_intro_FSCommand(ByVal command, ByVal args)

call U3P_intro_DoFSCommand(command, args)

end sub

</script>

</HEAD>

<BODY bgcolor="#FFFFFF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" onunload="return window_onunload()" onLoad="java script:startTimer();" onBeforeUnload="java script:doOnUnload('U3P_intro','completed');" onContextMenu="java script: return false;" onKeyDown="java script: return disableKeys();">



<script type="text/javascript">

var swfFile = 'U3P_intro.swf';

if (swfFile.indexOf('.swf')>-1)

swfFile=swfFile.replace('.swf','');

AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,19,0','width','100%','height','100%','src',swfFile,'id','U3P_intro','name','U3P_intro','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie',swfFile );

</script>



</BODY>

</HTML>




User is offlineProfile CardPM
Go to the top of the page
+Quote Post
gmafuken
post Sep 9 2007, 01:21 AM
Publicado: #2


Newbie
*

Grupo: Members
Mensajes: 16
Registrado: 5-September 07
Miembro nº: 210.856



por lo que veo ese codigo da condiciones en caso de que exista o no APIWin
salu2


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
edgaruhc
post Sep 10 2007, 03:07 PM
Publicado: #3


Miembro Avanzado
***

Grupo: Members
Mensajes: 57
Registrado: 27-September 06
Miembro nº: 181.946



ya no hay problema, estuve estudiando unos apuntes y creo que lo logre

YA PUEDEN CERRAR EL TEMA

GRACIAS


User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
Closed TopicTopic OptionsStart new topic

Collapse

> Topicos similares

Ayuda con instalacion de XP sp3 en SATA! gaby_help 7 0 Hoy, 08:10 PM
By: gaby_help
Ayuda Urgente tany23 28 2 Hoy, 02:49 PM
By: tany23
ayuda mi pc esta muy lento maryory15 176 4 Hoy, 10:35 AM
By: Caito
Ayuda Urgente tany23 14 1 Hoy, 10:02 AM
By: Kbite