Gossamer Forum
Home : General : Perl Programming :


Quote Reply

I would like some help on having some kind of display window incorporated in my script. For example I would like to place errors in a separate window insted of on the html. I have a script asking the user to enter information. At present I am validating by passing a value ( error message ) to a function that will print the error message and display the form again. The problem is that the form gets printed too many times. I tried flush() to clear the previous form - however the result was everything got cleared.

sub displayForm
$value = shift;

print start_form( );

print h1( 'Sender' );
print p( $value );
print p;
print 'Senders Name : ';
print textfield(-name=>'sname',
print p;
print'Senders E Mail : ';
print textfield(-name=>'semail',
print p;
print'Senders Ph No : ';
print textfield(-name =>'sphone',
-size =>30);
print p;
print 'Reipients Ph No : ';
print textfield(-name =>'recip',
-size => 30);
print p;
print 'What is your comment?';
print p;
print textarea(-name=>'content',

print submit;
print end_form;
print end_html;
print hr;