Link to home
Start Free TrialLog in
Avatar of MCPJ
MCPJ

asked on

Error 301

I am setting up a web page that our parent company sent me (from Spain), but I am a novice to web design and html.  When I open the htm link I get the following errors:
1.  Error con servidor: 301.  . Variable scorm: cmi.suspend_data
2.  Error con servidor: 301.  . Variable scorm: cmi.core.lesson_status (twice)
Then the page seems to load just fine.  I noticed that cmi.suspend_data and cmi.core.lesson_status are both referenced in javascript files.  Don't know if this helps.
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

The http status code 301 does say: page moved (or simply: redirection)
That is for browser not an error code because browser does folow the redirection.
Now if you have some AJAX requests in that script files, like XmlHttp, then status code 301 is not handled automaticaly.
Do you see XmlHttp anywhere in your script?

Avatar of MCPJ
MCPJ

ASKER

No, there's no mention of XmlHttp in any of the files.  Below is the scorm.js file.
var lesson_status_ini;
function Marcar_Iniciado(){
      LMSInitialize();
      lesson_status_ini = Val_Var("cmi.core.lesson_status");
      if ((lesson_status_ini == "completed") || (lesson_status_ini == "passed")  
            || (lesson_status_ini == "failed"))
           {}
      else
            Env_Var("cmi.core.lesson_status","incomplete");
      LMSFinish();
}
function Marcar_Finalizado(){
      LMSInitialize();
      lesson_status_ini = Val_Var("cmi.core.lesson_status");
      Env_Var("cmi.core.lesson_status","completed");
      LMSFinish();
}
function Val_Var(variable_scorm){
      var valor = LMSGetValue(variable_scorm);
      var cod_error = LMSGetLastError();
      if (cod_error != 0)
            Tratar_Error(cod_error, variable_scorm);
      return valor;
}
function Env_Var(variable_scorm,valor){
      var valor = LMSSetValue(variable_scorm, valor);
      var cod_error = LMSGetLastError();
      if (cod_error != 0)
            Tratar_Error(cod_error,variable_scorm);
}
function Tratar_Error(codigo,variable){
      var des_error = LMSGetErrorString(codigo);
      alert('Error con servidor: '+codigo+'. '+des_error+'. Variable scorm: '+variable);
}
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial