Trying to reload the diagram

Thanks for solution walter… But will u please mention where exactly we need to clear the div… In my case iam getting empty div after reloading…since iam clearing the div just before creating my diagram.modal