Gossamer Forum
Home : General : Perl Programming :

Help...

Quote Reply
Help...
Hi,

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',
-size=>30);
print p;
print'Senders E Mail : ';
print textfield(-name=>'semail',
-size=>30);
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',
-rows=>10,
-columns=>50);

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

}

Thanks,
Mike
Subject Author Views Date
Post Help... TheSafePick 2898 Feb 21, 2004, 5:14 PM