struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felipe Lorenz" <felipe.lor...@gmail.com>
Subject Re: s:select - execute action onChange
Date Wed, 04 Jun 2008 19:44:27 GMT
Hi. What action? A action to update another select, i.e.?

I use something like this:

onChange="jsFunction(this.value);"

function jsFunction( id ) {
  var div = dojo.widget.byId("<my div>");
  div.href = "myAction?myField="+id;
  div.refresh();
}

That is it?

On Wed, Jun 4, 2008 at 4:12 PM, Stetze2008 <stetze2008@gmx.de> wrote:

> hi I'm sorry but I did not find a quick solution for my problem on the web.
>
> I want to execute an action if another value of the select-box was
> selected.
> So i guess I have to use the onChange attribute but I dont know how.
>
> this is my actual form:
>
>   <s:form action="changeDefaultScope" namespace="/user" method="POST"
> theme="simple">
>               <s:select list="myList" key="label.allscopes"
>                   listKey="id" listValue="name" value="myValue"
> emptyOption="false" name="scopeId" theme="simple" />
>               <s:submit  key="button.changeScope" theme="simple" />
>   </s:form>
>
> I would like to call the action without the submit button. (Javasscript -
> onChange)
>
> Can anybody help? Thanks in advance.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message