Home Dynamic pass value in a Play2 scala template
Reply: 0

Dynamic pass value in a Play2 scala template

user5154 Published in September 21, 2018, 8:04 am

I try to dynamically change value of its variable. Once onclick (Change Ticket ID ) button then execute onClickSendEmail and variable value should be change of tickedId. Its unable to update with newTickedId. I tried while create variable using @defining and individual calling by function also. So, Basically I got stuck. how it will be solve.

@(sender: String)
<!--@{var tickedId = "tickedId"}-->

@defining(sender.contains("@")) {isEmail =>
@main((if(isEmail) "Email" else "Chat") + " Messages - " + sender) {

 <a onclick="onClickSendEmail();return false;">
            Change Ticket ID

@defining("getTicketId()") { tickedId =>

                <textarea id="emailArea" cols="100" rows="4" name="emailArea"></textarea>

<script type="text/javascript">
            function onClickSendEmail() {
                tickedId= "NewUpdatedTicketId";
     function getTicketId() {
             return "NewUpdatedTicketId";
share|improve this question

1 Answer 1

active oldest votes
up vote 1 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.29633 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO