简体   繁体   English

游戏框架中的互动

[英]Interaction in playframework

I'm new to Playframework, and get a question: When people search something, the result is rendered in some chart generated by google visualization. 我是Playframework的新手,并遇到一个问题:当人们搜索某些内容时,结果将呈现在由Google可视化生成的某些图表中。 When people selected some point on the chart, I got the row# and col#. 当人们在图表上选择某个点时,我得到了行号和列号。 I need to get these two data to backend, fetch some data using this row# and col# and render the data in a new chart. 我需要获取这两个数据到后端,使用此row#和col#获取一些数据,并将数据呈现在新图表中。 Any idea on how to route this process? 关于如何路由此过程的任何想法?

you should use jquery.ajax() and jsRoutes to call your backend. 您应该使用jquery.ajax()和jsRoutes调用后端。 then, you should add a new function in the "complete" tag option of ajax method ( http://api.jquery.com/jQuery.ajax/ ) that will render your new chart. 然后,您应该在ajax方法( http://api.jquery.com/jQuery.ajax/ )的“ complete”标记选项中添加一个新函数,该函数将呈现新图表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM