if I run this locale.jsp mx.controls.Alert.show(language); can show the language value
1.locale.jsp <%@ taglib uri="FlexTagLib" prefix="mm" %> <mm:mxml> <% String s =request.getHeader("Accept-Language"); System.out.println("locale:"+s); String l = s.substring(0,2); String c = s.substring(3,5); %> <mx:Application pageTitle="Resource bundles sample application" xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:view="com.benorama.flex.samples.payment.view.*" xmlns:globalization="com.benorama.flex.globalization.*" initialize="initLocale()" > <mx:Script> <![CDATA[ var language:String; var country:String; function initLocale(){ language = "<%=l%>"; country = "<%=c%>"; mx.controls.Alert.show(language); resourceBundleDelegate.setLocale(language,country); } ]]> </mx:Script> <view:PaymentView /> <globalization:ResourceBundleDelegate id="resourceBundleDelegate" /> </mx:Application> </mm:mxml> 2.portal.jsp <%@ page session="false" contentType="text/html" import="java.util.*, multilanguage.*"%> <%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %> <%@ taglib uri="FlexTagLib" prefix="mm" %> <portletAPI:init/> <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%"> <tr height="500"> <td> <mm:mxml> <% String s =request.getHeader("Accept-Language"); System.out.println("locale:"+s); String l = s.substring(0,2); String c = s.substring(3,5); %> <mx:Application pageTitle="Resource bundles sample application" xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:view="com.benorama.flex.samples.payment.view.*" xmlns:globalization="com.benorama.flex.globalization.*" initialize="initLocale()" > <mx:Script> <![CDATA[ var language:String; var country:String; function initLocale(){ language = "<%=l%>"; country = "<%=c%>"; mx.controls.Alert.show(language); resourceBundleDelegate.setLocale(language,country); } ]]> </mx:Script> <view:PaymentView /> <globalization:ResourceBundleDelegate id="resourceBundleDelegate" /> </mx:Application> </mm:mxml> </td> </tr> </table> if I run this locale.jsp it have not pop alert, not execute the code: mx.controls.Alert.show(language) who hase these experience,can tell me the reason, thanks Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/