AJAX doesn't work for "flag" field print in node.tpl In node.tpl I use this code:

&lt;?php print flag_create_link('prova', $node-&gt;nid); ?&gt;


Flag links work fine, but JavaScript toggle not. The flag link doesn't change to "Unflag link" after click.
Any idea?

Why put me on hold? What's not clear about that?



Update

At moment I solved with views. Set view full content node and set "Ajax" and "Flag refresh" under Other settings of views.
In original node view the problem remains.
It might be too late to add the required JS in the node template.
Try adding your flag link to hook_preprocess_node in template.php instead.

e.g

function MYTHEME_preprocess_node(&amp;$vars){
  $vars['flag_link'] = flag_create_link('prova', $vars['node']-&gt;nid);
}


then in your node template

&lt;?php print $flag_link; ?&gt;