Hi,

I have a panel that I add via AJAX to my page. On this panel I have a 
StringHeaderContributor block that I want to add. It's not doing anything. Does 
this not work when added via AJAX? The same code works fine when on a normal 
page. 

String altText = "some value from an i18n properties file";
StringHeaderContributor initJavascript = new StringHeaderContributor(
                                "<script type=\"text/javascript\">" +
                                        "$(document).ready( function(){" +
                                                "initDatePickerAltText(' " + 
altText + "');" +
                                        "});" +
                                "</script>");
                add(initJavascript);


The reason I need to do this is because I need to send an internationalised 
string to a javascript function to set up it's alt text which I retrieve from 
the message bundle.  I can't do this on the base page because the javascript 
component hasn't been added to the page at this stage.

thanks,
Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to