That's not possible, for the following reason

- Template variables are processed server side, before passing to the 
client browser
- Javascript is execute client side, any changes to the variable (which the 
browser won't even have a record of) won't reflect back up to the server.

On Thursday, 13 October 2016 23:52:11 UTC+11, Ragini Prasad wrote:
>
> I am creating a variable in template and stashing it. Basically I want to 
> create a variable in template, modify it in java scripts used in template 
> and pass it to controller.
> <% my $pagestatus=0; %>
> <%= stash "pagestatus" %>
>
> I need this variable in controller. I am trying to get it there in this 
> way:
> $status= $self->param('pagestatus');
>
> This value never gets reflected in my controller. What is the right way to 
> do it ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to