简体   繁体   中英

Invoke a tag library on anchor link click event without form refresh?

I've a scenario where I've to make a call to Grails/ jsp taglib in order to get data and feed to the google charts. Here is my GSP code.

<a href="#empTab" onclick="initializeData();">

$(document).ready(function(){ initializeData()

function initializeData(){
    var chartsData = {}
   chartsData.frameDelayVariation = <emp:metrics name="${name}"  timeInterval="${timeInterval}" />
}
});

When I first come to the page,it invokes taglib and when I click on HREF link, the JS function get called but taglib not being invoked...

So is there any way that I could achieve this by Jquery without form submit?

使用支持ajax的grails remoteLink标记来调用控制器并重新加载所有google图表脚本库的onSuccess属性,以便使用新的Json数据重新加载我的所有google图表。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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