Highlighted

I can not understand this code

New Here ,
Aug 25, 2016

Copy link to clipboard

Copied

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

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

alert('Aviso!');
window.parent.document.forms[0].edAlgo.select();
window.parent.document.forms[0].edAlgo.focus();

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.

HTH,

^_^

Views

167

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

I can not understand this code

New Here ,
Aug 25, 2016

Copy link to clipboard

Copied

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

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

alert('Aviso!');
window.parent.document.forms[0].edAlgo.select();
window.parent.document.forms[0].edAlgo.focus();

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.

HTH,

^_^

Views

168

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 25, 2016 0
LEGEND ,
Aug 25, 2016

Copy link to clipboard

Copied

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.

HTH,

^_^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 25, 2016 2
New Here ,
Aug 25, 2016

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 25, 2016 0
LEGEND ,
Aug 25, 2016

Copy link to clipboard

Copied

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. 

V/r,

^_^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 25, 2016 0
New Here ,
Aug 26, 2016

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2016 0