4 Replies Latest reply on Aug 26, 2016 9:31 AM by yagod50339691

    I can not understand this code


      what do mean "window.parent.document.forms"

      is there a way to know what do mean without have rest of the code?


        • 1. Re: I can not understand this code
          WolfShade Level 4

          This is a JavaScript question, not a ColdFusion question, but I will attempt to answer it, anyway.


          window = self.


          parent = self is a child window, so parent is the window that spawned self.


          document = document object model (your code).


          forms[0] = first form in an array of forms.


          window.parent.document.forms[0] = opening (parent) window form.


          .adAlgo.select() = select form element "adAlgo".


          .adAlgo.focus() = place cursor in/on (focus) form element "adAlgo".


          It looks like it's part of form validation; if something in adAlgo is not correct, place the cursor there so the user knows that the value needs to be corrected.


          This is a complete guess, of course.





          1 person found this helpful
          • 2. Re: I can not understand this code
            yagod50339691 Level 1

            thanks a lot


            helped me alot, only in know that is a JavaScript, i am very scatterbrained still


            but with the code seem be all sure, already be working properly

            (at least up to now)


            and sorry by the error of english

            i am from brazil and i not know much well english

            • 3. Re: I can not understand this code
              WolfShade Level 4

              Your English is not horrible; I think I understand what you are saying and asking.  Have you thought of using a mechanical translator, like translate.google.com?  (??????.google.br??)


              If by 'scatterbrained' you mean 'new to coding' - we all have to start somewhere, yes?


              Glad to help you to understand the code you supplied. 


              Seu Inglês não é horrível; Eu acho que entendo o que você está dizendo e fazendo. 
              Você já pensou em usar um tradutor mecânico, como translator.google.com? (??????. Google.br ??)
              Se por "desmiolada" quer dizer "novo para codificação '- todos nós temos que começar em algum lugar, certo?
              Fico feliz em ajudá-lo a entender o código fornecido.  






              • 4. Re: I can not understand this code
                yagod50339691 Level 1

                Yes, i even thought of translator to talk fast, i use to translater some works

                but will be very easy and i not will learn

                i want much talk inglish


                vlw mesmo cara, fica ai um agradecimento em português