Only thing I my self find sofar is that I should be using the
sticky tag under textfield:
textfield(-name=>'fieldsname', -override=>1);
or use force in stead of override..
Ok I did not see that right away but I find the differences in behaviour
quite puzzling.
Arnold van Kampen
On Sat, 12 Jan 2002, Arnold van Kampen wrote:
>
> Hi
>
> What could be wrong in this few lines:
> It is supposed to add 10 to the value in the textfield after each
> submission.
> I tried it on another pc too, same result.
> (one I leave alone most of the time; no messing around)
> I also tried it under the perl directory (Apache::Registry)
> I tried using CGI 2.80 in stead of the old 2.56
> I tried using hidden field, same result.
> I tried more oo like with my $q = new CGI
> The textfield entry does not work(or only 2 times!??).
> h1($bla) always shows the proper value, yet it does not appear in the
> textfield)
> The outcommented string does work repetitively as expected!
> I have been using these cgi functions for quite a while.
> This is so stupid it hurts.
> Does this look familiar to anyone?
>
>
>
> package Test::Test;
> use strict;
> use CGI qw(:standard :html3);
> use Apache::Reload;
>
> sub handler {
> my $bla= param('position') + 10;
> print header,start_html,h1('aaaaaa'),
> startform,
> textfield(-name=>'position',-value=>$bla, -maxlength=>10),
> # "<td><input type=text name=position value=".$bla."></td>",
> h1($bla),
> submit(),
> endform,
> end_html;
> }
>
> 1;
> __END__
>
>