LEADTOOLS JavaScript (Leadtools.Controls)

Dispose Method (ImageViewer)

Show in webframe
Example 
Destroys this ImageViewer and removes it from the page.
Syntax
 function Leadtools.Controls.ImageViewer.dispose()
Remarks

ImageViewer will add HTML elements to the page and subscribe to multiple JavaScript events. If your application involves adding and removing ImageViewer objects from the page, then you must call the Dispose method to remove the object from the page and clean up any resources being used.

Example

Start with the ImageViewer example, remove all the code inside the example function (search for the "// TODO: add example code here" comment) and insert the following code:

Open the HTML page in your browser. Now when you click the Example button, the viewer will be removed.

example: function SiteLibrary_DefaultPage$example(viewer) {
   // Dispose the viewer (remove it from the page and release its resources)
   viewer.dispose();
},
See Also

Reference

ImageViewer Object
ImageViewer Members

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.