In my .xsl file I have this code:
importantMsg = null;
<script type="text/javascript">
$.getScript("std/lamFile.js").done(function(script, successOrFail, exept) {
importantMsg = getMessage();
});
</script>
isoNS.PanelQ<xsl:value-of select="@CHECKID"/>Pensl = new Ext.Panel
({<xsl:if test="@CHECKID=9051">
items: [
{
xtype: 'label',
id: 'attentionLabel',
width: 200,
style: 'margin: 100px 0px 0px 24%;',
text: importantMsg <---------------- variable goes Here
}
]
</xsl:if>
});
I load a js file, and then call the getMessage method, which returns a string. This string is the one I call importantMsg, as you can see in the code. Now I want to use this string in the extjs code, where I have the label xtype. But the importantMsg is not set here, it is just undefined. So I guess I should get it using xsl? How can I do this?
The weird thing is that, if I write an alert(""); before the Ext.Panel is created, then the importantMsg will be inserted.
Any help is greatly appreciated