fea jabi wrote:
In my JSP, have to use the defined variable in javascript. How can I
use it?
var totalObj = document.getElementById("total");
Wow, that's so far off I'm not even sure where to start. Marked OT
because this has more to do with a fundamental misunderstanding of how
webapps work than anything struts-ish.
JavaScript is run client-side, Struts tags (or any other, for that
matter) are run server-side. This sounds familiar; did we have a go at
this once before?
You _could_ do something like (syntax probably wrong; working with other
technology today):
var total = <c:out value='${total.intValue}'/>;
total += whatever;
and then reference 'total' with a javascript chunk or via any number of
element replacement techniques on the page.
Does that help?
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]