You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Marcel Schepers <ma...@gmail.com> on 2020/08/28 17:39:00 UTC

redirect after javascript ajax call

Hello,

I am having a bit of a hard time to figure out what the best Tapestry 
way is to do the following. My application's main index page should 
forward the user to another page. I am able to do so by implementing the 
onActivate method and let it return the class of the page to go to. So 
far so good.

What I would like to do now is to run a client-side script that sends 
some screen dimensions to the server _before_ the new page renders its 
response.

A somewhat visual representation of the problem looks like:
request -> index page -> javascript with a server call -> new page.

Is there an easy way to get this done in Tapestry?

Many thanks in advance!

Best,
Marcel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: redirect after javascript ajax call

Posted by Marcel Schepers <ma...@gmail.com>.
> Check this and let us know whether it's what you need:
> https://tapestry.apache.org/ajax-and-zones.html#AjaxandZones-Invokingserver-sideeventhandlermethodsfromJavaScript
>
Thank you the link. It did help a bit, but it mainly made me realize 
that my JavaScript/jQuery knowledge is by no means sufficient to solve 
my own problem. I have some homework to do .... getting comfortable with 
jQuery.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: redirect after javascript ajax call

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, Aug 28, 2020 at 2:39 PM Marcel Schepers <ma...@gmail.com>
wrote:

> Hello,
>

Hello!


> I am having a bit of a hard time to figure out what the best Tapestry
> way is to do the following. My application's main index page should
> forward the user to another page. I am able to do so by implementing the
> onActivate method and let it return the class of the page to go to. So
> far so good.
>
> What I would like to do now is to run a client-side script that sends
> some screen dimensions to the server _before_ the new page renders its
> response.
>
> A somewhat visual representation of the problem looks like:
> request -> index page -> javascript with a server call -> new page.
>
> Is there an easy way to get this done in Tapestry?
>

Check this and let us know whether it's what you need:
https://tapestry.apache.org/ajax-and-zones.html#AjaxandZones-Invokingserver-sideeventhandlermethodsfromJavaScript



>
> Many thanks in advance!
>
> Best,
> Marcel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

-- 
Thiago