Forum Discussion
OK!!!, i do it!. Works halfway!!!.
I dont know why the code stops in the line 16.
This code is similar to a post from Lucas. 2 years ago, and he did the same, he created a for and went through it with a rows.Length().
In my case he does not get to execute that line of code. It stops before, if no error.
[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:f43be1b6-faa2-4c49-a6cd-ca5c5bcb049b:type=text&text=aras.vault.selectFile%28%29.then%28%0D%0Afunction%20%28fileObject%29%7B%0D%0A%20%20%20%20file%20%3D%20fileObject%3B%0D%0A%20%20%20%20alert%28%22Filename%3A%22%20%2B%20file.name%29%3B%0D%0A%0D%0A%20%20%20%20var%20reader%20%3D%20new%20FileReader%28%29%3B%0D%0A%20%20%20%20reader.readAsText%28file%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%20here%20we%20tell%20the%20reader%20what%20to%20do%20when%20it%27s%20done%20reading...%0D%0A%20%20%20%20reader.onload%20%3D%20readerEvent%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20content%20%3D%20readerEvent.target.result%3B%20%2F%2F%20this%20is%20the%20content%21%0D%0A%20%20%20%20%20%20%20%20alert%28%22Contenido%3A%22%20%2B%20content%20%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20var%20rows%20%3Dcontent.split%28%22%5Cn%22%29%3B%0D%0A%20%20%20%20%20%20%20%20alert%28%22registros%3A%20%22%29%3B%0D%0A%20%20%20%20%20%20%20%20alert%28rows%5B1%5D%29%3B%20%20%20%2F%2F%20the%20code%20stops%20here%21%21%21%21%0D%0A%20%20%20%20%20%20%20%20alert%28rows.count%28%29%29%3B%0D%0A%20%20%20%20%20%20%20%20alert%28rows.length%28%29%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20var%20i%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20for%20%28i%20%3D%200%3B%20i%20%3C%20rows.length%28%29%3B%20i%2B%2B%29%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20alert%28%22Entra%20en%20el%20FOR%22%29%3B%20%20%20%20%0D%0A%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20parts_to_add%20%3Drows%5Bi%5D.split%28%22%3B%22%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20alert%28parts_to_add%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20alert%28parts_to_add%5B0%5D%29%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%7D%0D%0A%7D%29%3B%0D%0A]
Nothing, its work fine, its not rows.length(), the correct is rows.length.