Pages

Thursday, August 23, 2012

Synchronous Javascript using event dispatchers

 if(!(resp['Indiform2']===undefined))
                        $(document).bind('pdf2',function(){
                         generatepdf('individualaccountpdf','pdf2',resp);
                        });

Bind The event as per requirements and need

And then execute it when every thing is done with

 if(filename=='InvestmentAcoountAgreement')
 $(document).trigger('pdf2');

No comments:

Post a Comment