use CGI::Ajax; use CGI; $pjx = new CGI::Ajax ('func','\&func'); $cgi = new CGI; $html=< var previous_value; function user_click (current_value) { previous_value=current_value; func([],['change_location']); } CLICK ONCE OK, SECOND TIME FAILED
EOF sub func() { do something .. return something .. } $pjx->build_html($cgi,$html);