redirect after javascript ajax call

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

redirect after javascript ajax call

MrclSchprs
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: redirect after javascript ajax call

Thiago H de Paula Figueiredo
On Fri, Aug 28, 2020 at 2:39 PM Marcel Schepers <[hidden email]>
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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

--
Thiago
Reply | Threaded
Open this post in threaded view
|

Re: redirect after javascript ajax call

MrclSchprs

> 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: [hidden email]
For additional commands, e-mail: [hidden email]