Re : Ajax Refresh issue: Element is not defined

Re : Ajax Refresh issue: Element is not defined

  
I am expeiencing an issue with a container that is displayed via ajax regresh. When the display boolean is set to true, and the conatienr is refreshed via ajax, the message "(ContainerID)Element is not defined" is returned. Please see attached image for more details.

The conatiner is however displayed properly, and closed without any issues. If the same rendered container is to be displayed again, no error message appears. Only on the first instance of display.

I am using version 6.0.1.16 


Any ideas??

Thanks

RN.
Hi Robbie,

That was an known issue in the 6.0 version with hidden Edit Records.
We did some changes in 7.0 to prevent those cases.

I don't remember exactly how to workaround it, but try these in order:

1 - Instead of the display false, on the container use an extended property "style" with If(someVisibleVariable, "", "display:none")
2 - use an "If" instead of a Container with display false.
3 - If that none of those doesn't work, try with 2 edit records, one always visible (without anything inside and can have an extended property "style"="display:none" if needed) and the other one with all the inputs/buttons with the "Parent edit record" targeting the visible one.

Regards,
João Rosado
Hi Robbie.
can tou attach the oml so I can take a look.
it seams like the container is not appearing in the screen.

Best Regards,
Carlos Rocha
hi,

can anybady help me. i have the same error. i tried the above soluctions. but it not working.

Regards,
sattibabu vatti.
Sattibabu - The answers above should resolve it.

J.Ja
Hi Sattibabu,

What version are you using?
The reported problem should be fixed in 7.0.

Are you able to share a simple eSpace that replicate it?

Regards,
João Rosado
HI,

We are using 6.0 Version. I have tried all the three solution provided above but does not work.
Please give some more information about option 3.

Regards,
Sattibabu Vatti
Hello all.
I'm using version 8.0 and I'm having this problem.
For now just tried the solution 2 but it didn't work. The Edit Record when refreshed is displayed but the error message occurs:
"An exception occurred in the client script.
Error: OsPage_wt30_Common_wt2_block_wtMainContent_wtMainContent_wt18_wt29_wtTR_Plano_ListasDeTarefas_ctl03_wt8_wt22_wtER_NovaPeriodicidade_RecElements is not defined "
Don't know if makes difference but the Edit Record has some rows with the extended property "style" defined has "If( <bool=true>, "", "display:none;").
I will try to produce a simple espace where the problem can be reproduced.
Attached follows a very basic espace "EditRecordError" where the problem, exactly as explained in the first post, happens. Version 8.0.

Edit:
In the example espace the problem is resolved if the property "Validation Parent" of the "Cancel" button, which hides the edit record, is left empty instead of the name of the edit record.
I've found that for extended property "style" the use of "display:none" is not working. Instead use "display: none". Try it.
 
Robbie Nati,
In my case I've discovered that the problem was in the buttons inside the edit record, in your case "Save", "Cancel" or "Delete".
Leaving the field "Validation Parent" of the buttons empty, instead of the name of the edit record, it works!
Just to validate Tiago's recommendation, I tried all the methods above and the only method that works is not to have the Parent Edit Record set to anything, i.e. it needs to be blank (None). The difficulty is that I have more than one edit record on my screen, but only one of the edit records changes in visibility, the other is always there and that one has its Parent Edit Record set. I hope that this helps.
Hi all,

Just to let you guys know that this error has been fixed in the latest platform version (8.0.0.16).

http://www.outsystems.com/NetworkDocuments/DocumentDetail.aspx?DocumentId=1073&VirtualDirectoryId=0
Fixed runtime javascript errors when refreshing screens with edit records without inputs or inside lists (#566912)

Regards,
João Rosado

Hi Tiago,

Working on a client with 7.0 and just to let you know that this thread was once again helpfull! ;)

Cheers,
Hermínio Mira
Hermínio,
Nice! :)