Error 301

Posted on 2007-10-15
Last Modified: 2008-01-09
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.
Question by:MCPJ
    LVL 63

    Expert Comment

    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?

    LVL 1

    Author Comment

    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(){
          lesson_status_ini = Val_Var("cmi.core.lesson_status");
          if ((lesson_status_ini == "completed") || (lesson_status_ini == "passed")  
                || (lesson_status_ini == "failed"))
    function Marcar_Finalizado(){
          lesson_status_ini = Val_Var("cmi.core.lesson_status");
    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)
    function Tratar_Error(codigo,variable){
          var des_error = LMSGetErrorString(codigo);
          alert('Error con servidor: '+codigo+'. '+des_error+'. Variable scorm: '+variable);
    LVL 82

    Accepted Solution

    The code supplied are simply helper functions, one of which is the one that logs/reports the error. Basically the error means "the webaddress that you requested was moved elsewhere". To get rid of the problem you need to figure out two things:
    1. Where on the server is the file that you are looking for?
    Once you locate it on the server, access it directly via the browser and if it load correctly, write down the URL for it.
    2. Where in your javascript code are you calling that URL?
    Once you locate the portion of your code where you are making this call, update the URL with the one recorded on step 1 above.

    The supplied code is not calling the URL. It must be:
    a. hardcoded elsewhere on some other script
    b. since you seem to usin AJAX, perhaps you are getting the link from an AJAX request. If so, you must check the data that is coming from the AJAX request and see which data source contains the incorrect URL and update it there
    c. a user input form or pop-up.  Not much you can do here, except notify the user of the updated link.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
    Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
    Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now