On Thu, 2008-08-07 at 17:43 -0700, Dave Newton wrote:
> --- On Thu, 8/7/08, nauke. <[EMAIL PROTECTED]> wrote:
> > No matter how I tried to pass those values in as
> > parameters, my JavaScript function kept treating
> > it as literal text
> >
> > Like:
> >
> > <%=String aString = "Hi There!"%>
--- On Thu, 8/7/08, nauke. <[EMAIL PROTECTED]> wrote:
> No matter how I tried to pass those values in as
> parameters, my JavaScript function kept treating
> it as literal text
>
> Like:
>
> <%=String aString = "Hi There!"%>
That's most likely not what you wanted, you mean:
<% String aString =
Hi Dave,
Thanks for replying.
Yeah I declared variables in my JSP file and tried to parse them through as
arguments to the JavaScript function like mentioned.
No matter how I tried to pass those values in as parameters, my JavaScript
function kept treating it as literal text hehe!
Like:
<%=Strin
--- On Thu, 8/7/08, nauke wrote:
> There must be a more elegant solution than this!
Not really: you're trying to access server-side resources from the client side.
If you're not going to run your JavaScript through the JSP processor your
options are limited, for obvious reasons.
One solution wa
Hi Owen,
Thanks for your reply.
I think I did try that.
The only solution I have found to work was to do this:
Application.properties:
my.message=Hi There!
myJSPFile.jsp:
myJSFile.js
var msg = document.myform.myMessage.value;
alert(msg);
The deadline is today so I'll have to do what works so
In your jsp code set a variable to be the value you want, as shown
earlier in this thread by Balwinder, and then read that variable in
your Javascript code. If you're using OO javascript, you can make it
nice and tidy by passing the parameter in your "constructor", or set
it in a method. Example:
Thanks for that.
I think that only works if the javascript is within the JSP file right?
My javascript functions are in it's on .js file ...
On Thu, Aug 7, 2008 at 8:23 PM, Balwinder <[EMAIL PROTECTED]> wrote:
> nauke. wrote:
>
>> Hi all,
>>
>> Is there a way to access values in ApplicationResour
nauke. wrote:
Hi all,
Is there a way to access values in ApplicationResources.properties in
Javascript functions?
I've found a way where I can just pass a value from the app resource file as
a parameter, but discovered that I return alerts with different messages
based on some criteria.
Any ide
Hi all,
Is there a way to access values in ApplicationResources.properties in
Javascript functions?
I've found a way where I can just pass a value from the app resource file as
a parameter, but discovered that I return alerts with different messages
based on some criteria.
Any ideas?
Thanks heap
9 matches
Mail list logo