That's not possible, for the following reason
- Template variables are processed server side, before passing to the
the browser won't even have a record of) won't reflect back up to the
server. By the time your client side JS is executed, the variable doesn't
exist, it's just been replaced with the 0 wherever it's been used.
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
> $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
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.