I have an ajax call that fills the window with data as follows:
var win = new Q.Window({
position:'fixed',
id: id,
trigger: '',
text:json_decode(json.content),
title: refr[0][2],
style: className,
onShow: function(self){
shroud_off();
if (json.execute)
{
if (json.execute!='')
{
//run on a timeout so the window displays even if code is bad...
setTimeout(function(){eval(json_decode(json.execute))},200);;
}
}
}
});
What I am trying to achieve is that the above onShow code runs (which it does at present) but I also want the default onShow code to run on the qwindow - which at present it dosent (I added an alert to the default onShow) and this dosent run unless the self.onShow(); is added inside the onShow above and the Q.callback('onShow',this); taken out of the default class onShow
Im running:
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.0 ( .NET CLR 3.5.30729)
Windows Vista.
Thanks for all your help.
Andy
If I remove the onShow method from my code completely AND edit qwindow.js and add an alert('show') into the default onShow method - the alert is NOT called (the window shows ok but no alert),
If I add my own custom onShow code it is run ok as this was not the problem - the default class onShow is still not called.
if I switch to version 0.7.6 and do the same it works ok, in v0.7.6 if I add my own custom onShow to a new qwindow its called ok and the default class onShow is called too.
Hope all this helps..
Steps to reproduce are simply edit the onShow in qwindow.js and add an alert,
Launch a window and no alert is shown
andy
cheers
andy
Excellent work again!!,I love testing / using these libraries they are wicked!
Thanks again