I have define variable error in struts.properties as follows:
error=this is an error
Now I can call this error as follows:
ErrorMsg = "<s:property value='getText(\"error\")'/>";
and it works, the result is: ErrorMsg=this is an error
How to get the text of variable instead of string? I tried the following:
var m="error";
error1 = "<s:property value='getText(m)'/>";
error2 = "<s:property value='getText(\"m\")'/>";
I use firebug debugger and error1 and error2 are displyed as follows:
error1=""
error2=""
Any Idea? thank you in advance
You appear to be mixing server side and client side code.
The s:property tags will be evaluated first on the server side, long before any value of m is valid, as that is client side JavaScript code.
If you post what you're trying to achieve then I or someone else may be able to help further.
HTH