Hiding thick box then showing another one cause error
Hi folks,
I have a window that calls tb_show to open a page,
If i click on the close button, the following JavaScript code executed:
- javascript:self.parent.tb_remove();self.parent.showNewShadow();
the showNewShadow function is calling an AJAX and according to the result it shows another shadowbox
- function showNewShadow(){
- //call ajax
- //.......
- if (ajaxResult=='YES'){
- tb_show(...);//show the other page
- }
- }
This result on hiding the first shadow but a loading icons remains on the screen and the next shadow is not showing. Also a javascript error is fired ""Jquery is not defined"
In my opinion, the issue is that there is no enough time between hiding the first shadow and showing the next one.
I want to know the ideal solution for this issue, if it happened with some one of you.
Thanks