Hey There,
Thank you for taking the time to look. Javascript is not my forte so I'm quite stuck on this.
The problem is that sometimes javascript isn't working, unless it's put on a setTimer.
For instance, I was asking a window container to open. When that window container opened, I wanted the ckeditor to resetdirty. It wouldn't unless it was done as this:
eg. window.setTimeout(function(){CKEDITOR.instances["COMNAME"].resetDirty();}, 1000);
Another example is a window container has event onload that forces a list to refresh. The list onItemDraw event, setting a hidden variable to True.
{dialog.object}.setValue('isittrue','true');
window.alert({dialog.object}.getValue('isittrue'));
It would return a alert box with false even though I knew with 100% certainty that the code was correct.
I suspect it's because within these components they are more than just a simple ux component. For instance, one of our ux has:
-2 list controls with detail view
-Each detail view in it's own window component
-Ckeditor (rich text editor) as part of the detail window
What that really means is that I suspect each control within the component talks to each other and because javascript is asynchronous, it means all of the commands are happening at different times.
Is there a way around it or work out what events are interrupting?
Thanks
Jane.
Thank you for taking the time to look. Javascript is not my forte so I'm quite stuck on this.
The problem is that sometimes javascript isn't working, unless it's put on a setTimer.
For instance, I was asking a window container to open. When that window container opened, I wanted the ckeditor to resetdirty. It wouldn't unless it was done as this:
eg. window.setTimeout(function(){CKEDITOR.instances["COMNAME"].resetDirty();}, 1000);
Another example is a window container has event onload that forces a list to refresh. The list onItemDraw event, setting a hidden variable to True.
{dialog.object}.setValue('isittrue','true');
window.alert({dialog.object}.getValue('isittrue'));
It would return a alert box with false even though I knew with 100% certainty that the code was correct.
I suspect it's because within these components they are more than just a simple ux component. For instance, one of our ux has:
-2 list controls with detail view
-Each detail view in it's own window component
-Ckeditor (rich text editor) as part of the detail window
What that really means is that I suspect each control within the component talks to each other and because javascript is asynchronous, it means all of the commands are happening at different times.
Is there a way around it or work out what events are interrupting?
Thanks
Jane.
Comment