I want to display an alert message for 5 sec when click the 'update' button and after that to perform the update action.So this message should prevent the update action for 5 sec.

   my $cFunction = qq{
    function timeout_trigger() {
    function timeout_init() {
        setTimeout('timeout_trigger()', 2000);
    print $q->script($cFunction);
    <--html form--->
        $cInput_form .= $q->image_button({-src =>  '/media/images/save_1.png',-class => 'upd',-title => 'update', -name =>'Update', -value => $row_id, -onclick => 'timeout_init()'});
        print $q->fieldset ({-class => "ui-widget ui-widget-content"}, $cInput_form);
but this doesnt work. Why?