PDA

View Full Version : How to update window URL



rahul.katkar
7 May 2015, 2:17 AM
I have a button on my page, clicking on which should display a modal popup window with some content that is loaded from struts2 action result. Below is the code written to create popup.


var win;
Ext.application({
name : 'Fiddle',


launch : function() {
var button = Ext.get('copy_button');

button.on('click', function(){


win = Ext.create('Ext.window.Window', {
title: 'Copy Existing',
height: 400,
width: 500,
layout: 'fit',
modal: true,
loader: {
url: '<%= request.getContextPath() %>/demo/copy.action',
autoLoad: true
}
});

win.show(this, function() {
button.dom.disabled = false;
});
});
}
});


This popup window contains button on click of which I want to again call Struts2 action class, means I want to change its url. Can anyone please help me in this?? .

chamacs
7 May 2015, 9:48 AM
you could try:



win.getLoader().load({
url : 'newUrl'
});


Hope this helps.