Hi there.
OK, this is a little bit complicated.
I would live to find a different way to do this, but evidentially I am not able
to open a Text-File in JAVASCRIPT and fill an Array with the Values, so I have
to do it this way.
I am doing the following:
I use a File called "ApplicationRes ources.properti es" containing 2 columns
"message" & "content" with a FieldDelim "=".
This File contains Values for Labels in different Languages, so I can change
the Language always depending on the Browser-Language.
I have one for every language. (ApplicationRes ources.properti es for English,
ApplicationReso urces_de.proper ties for German ...)
I have a an Object looking like this:
<OBJECT id="Application Resources"
classid="clsid: 333C7BC4-460F-11D0-BC04-0080C7055A83">
<PARAM name="DataURL" value="properti es/ApplicationReso urces.propertie s">
<PARAM name="UseHeader " value="true">
<PARAM name="FieldDeli m" value="=">
<PARAM name="Filter" value="">
</OBJECT>
I do change the value for the "DataURL" always depending on the
Browser-Language.
document.getEle mentById("Appli cationResources ").object.DataU RL =
"ApplicationRes ources" + strBrowerLang + ".propertie s";
document.getEle mentById("Appli cationResources ").Reset();
I use this Object, to read the Data from the Recordset in changing the Filter
by using the following function:
function BeanMessage(str Message) {
document.getEle mentById("Appli cationResources ").object.Filte r = "message=" +
strMessage;
document.getEle mentById("Appli cationResources ").Reset();
strValue =
document.getEle mentById("Appli cationResources ").recordset.Fi elds("content"
).value;
return (strValue);
}
Within my BODY I use this for example:
<P>
<SCRIPT
type="text/javascript">doc ument.write(Bea nMessage("start .explain.1"));</SC
RIPT><BR>
<SCRIPT
type="text/javascript">doc ument.write(Bea nMessage("start .explain.2"));</SC
RIPT><BR>
<SCRIPT
type="text/javascript">doc ument.write(Bea nMessage("start .explain.3"));</SC
RIPT><BR>
</P>
This works perfectly fine when using the site locally on my computer, but as
soon as I try to work from the WebServer it doesn't anymore.
I get en error-message within the function "BeanMessag e" >>Item in Collection
not found<<. After closing the Alert no more problems.
When building a try-Block into the function "BeanMessag e" returning a Value
like "not-found" when try runs into an error, nothing will be found.
It looks like when using this on a WebServer the Object isn't populated yet ...
why?
Can anyone help me, why the Object isn't populated yet?
It seems to be populated after an Error-Message-Window.
Or, even better can tell me an easier way to do this ... and please I don't
want to create all Sites in different Languages, one change means changes in
several websites ...
Jay.
OK, this is a little bit complicated.
I would live to find a different way to do this, but evidentially I am not able
to open a Text-File in JAVASCRIPT and fill an Array with the Values, so I have
to do it this way.
I am doing the following:
I use a File called "ApplicationRes ources.properti es" containing 2 columns
"message" & "content" with a FieldDelim "=".
This File contains Values for Labels in different Languages, so I can change
the Language always depending on the Browser-Language.
I have one for every language. (ApplicationRes ources.properti es for English,
ApplicationReso urces_de.proper ties for German ...)
I have a an Object looking like this:
<OBJECT id="Application Resources"
classid="clsid: 333C7BC4-460F-11D0-BC04-0080C7055A83">
<PARAM name="DataURL" value="properti es/ApplicationReso urces.propertie s">
<PARAM name="UseHeader " value="true">
<PARAM name="FieldDeli m" value="=">
<PARAM name="Filter" value="">
</OBJECT>
I do change the value for the "DataURL" always depending on the
Browser-Language.
document.getEle mentById("Appli cationResources ").object.DataU RL =
"ApplicationRes ources" + strBrowerLang + ".propertie s";
document.getEle mentById("Appli cationResources ").Reset();
I use this Object, to read the Data from the Recordset in changing the Filter
by using the following function:
function BeanMessage(str Message) {
document.getEle mentById("Appli cationResources ").object.Filte r = "message=" +
strMessage;
document.getEle mentById("Appli cationResources ").Reset();
strValue =
document.getEle mentById("Appli cationResources ").recordset.Fi elds("content"
).value;
return (strValue);
}
Within my BODY I use this for example:
<P>
<SCRIPT
type="text/javascript">doc ument.write(Bea nMessage("start .explain.1"));</SC
RIPT><BR>
<SCRIPT
type="text/javascript">doc ument.write(Bea nMessage("start .explain.2"));</SC
RIPT><BR>
<SCRIPT
type="text/javascript">doc ument.write(Bea nMessage("start .explain.3"));</SC
RIPT><BR>
</P>
This works perfectly fine when using the site locally on my computer, but as
soon as I try to work from the WebServer it doesn't anymore.
I get en error-message within the function "BeanMessag e" >>Item in Collection
not found<<. After closing the Alert no more problems.
When building a try-Block into the function "BeanMessag e" returning a Value
like "not-found" when try runs into an error, nothing will be found.
It looks like when using this on a WebServer the Object isn't populated yet ...
why?
Can anyone help me, why the Object isn't populated yet?
It seems to be populated after an Error-Message-Window.
Or, even better can tell me an easier way to do this ... and please I don't
want to create all Sites in different Languages, one change means changes in
several websites ...
Jay.
Comment