Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2254
How to clone a WebDialogWindow object in JavaScript
posted

Hello

I would like to make a copy of the original WebDialog window object before making it visible

// like this

var w = $find('<% =WebDialogWindow1.ClientID %>');

var originalWindow = SomeCloneMethod(w); //I don't know how to do this

var pane = w.get_contentPane();

pane.set_contentUrl('AnotherWindow.aspx');

w.show();

//and then later

.......

w.hide();

w=originalWindow;

I tried all sorts of deep copy functions that I have found in the articles below but all raise "Out of memory"

If somebody can help me, thank you

http://javascript.about.com/od/objectorientedjavascript/a/oop17.htm

http://snipplr.com/view/15407/

http://blog.imaginea.com/deep-copy-in-javascript/

http://james.padolsey.com/javascript/deep-copying-of-objects-and-arrays/