You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sergio Sánchez González <se...@gmail.com> on 2008/11/04 12:16:49 UTC

Redirecting action with ajax enabled

I've found dojo fails when I retreive a page using ajax.

For example, a simple login:

    <div id="myLogin">
      <s:form action="login"  validate="true">

          <s:textfield name="username" label="Login name"/>
          <s:password name="password" label="Password"/>
          <s:combobox label="Companies" name="company" headerValue="--
Please Select --" headerKey="1" list="companies" />
          <s:submit targets="myLogin" theme="ajax" />

      </s:form>
    </div>

The page retreived uses dojo javascript but doesn't work. If I just
change the submit to: <s:submit targets="myLogin"/> then it works. But
of course, I lose the retreived page javascript.

Any idea how to keep the javascript getting the page by ajax?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Redirecting action with ajax enabled

Posted by Sergio Sánchez González <se...@gmail.com>.
I meant just changing the submit to <s:submit/>

And losing ajax...


2008/11/4 Sergio Sánchez González <se...@gmail.com>:
> I've found dojo fails when I retreive a page using ajax.
>
> For example, a simple login:
>
>    <div id="myLogin">
>      <s:form action="login"  validate="true">
>
>          <s:textfield name="username" label="Login name"/>
>          <s:password name="password" label="Password"/>
>          <s:combobox label="Companies" name="company" headerValue="--
> Please Select --" headerKey="1" list="companies" />
>          <s:submit targets="myLogin" theme="ajax" />
>
>      </s:form>
>    </div>
>
> The page retreived uses dojo javascript but doesn't work. If I just
> change the submit to: <s:submit targets="myLogin"/> then it works. But
> of course, I lose the retreived page javascript.
>
> Any idea how to keep the javascript getting the page by ajax?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org