Pawel,

I am doing something like shown below and it works good for me. Isn't it
calling the values from model/stack value from java script?  zipCodes is in
my model. Please tell me ur option. that would help me underst it better.  I
am using struts 2.1.6. Thanks.

function showmylist() {
  var myList = '<s:property value="zipCodes"/>';
  var seletedzipcodelist = new Array();
  seletedzipcodelist = myList.split(",");
  if (seletedzipcodelist != null && seletedzipcodelist != "") {
   for (i in seletedzipcodelist) {
    document.getElementById(seletedzipcodelist[i]).className = "showzip";
   }
  }
  document.getElementById("something").value = '<s:property
value="NewDate"/>';
 }



2009/12/17 Paweł Wielgus <poulw...@gmail.com>

> Hi Jim,
> action is on server side and javascript is on browser side,
> they don't interact, You can generate js server side but that's it.
> Js will be run in browser so it has no access to stack or action variables.
>
> Best greetings,
> Paweł Wielgus.
>
>
>
> 2009/12/17 Jim Collings <jlistn...@gmail.com>:
> > So I have two actions and one jsp.  The idea is that one is for the
> > entire page and another is for putting into a <div> via a JavaScript
> > method.
> >
> > Question:  How do I get items off of the value stack for use in
> JavaScript?
> >
> >
> > Jim C.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to