[perl] duda?
Ing. Roberto Andrade
randrade@campus.iztacala.unam.mx
Wed, 27 Jan 1999 17:48:01 -0600 (CST)
Hola:
> At 15:04 27/01/1999 +0100, you wrote:
> >El codigo que solicitas es el siguiente ( supongo )
> >
> > <form>
> > <input type="button" value="Retroceder" onclick="history.back()">
> > </form>
>
> Alguien me podria indicar como decirle que vuelva a la pagina anterior
> donde tenia un formulario, pero lo que necesito es que me de los campos
> vacios , retroceder y hacer un reset de los campos
> desde ya gracias
Tal vez esto es lo que necesitas, de perldoc CGI.pm:
----------------------------------------------------------------
CREATING A TEXT FIELD
print $query->textfield(-name=>'field_name',
-default=>'starting value',
-size=>50,
-maxlength=>80);
-or-
print $query->textfield('field_name','starting value',50,80);
textfield() will return a text input field.
Parameters
1. The first parameter is the required name for the
field (-name).
2. The optional second parameter is the default
starting value for the field contents (-default).
3. The optional third parameter is the size of the
field in
characters (-size).
4. The optional fourth parameter is the maximum
number of characters the
field will accept (-maxlength).
As with all these methods, the field will be
initialized with its previous contents from
earlier invocations of the script. When the form
is processed, the value of the text field can be
retrieved with:
$value = $query->param('foo');
If you want to reset it from its initial value
after the script has been called once, you can do
so like this:
$query->param('foo',"I'm taking over this value!");
NEW AS OF VERSION 2.15: If you don't want the
field to take on its previous value, you can force
its current value by using the -override (alias
-force) parameter:
print $query->textfield(-name=>'field_name',
-default=>'starting value',
-override=>1,
-size=>50,
-maxlength=>80);
------------------------------------------------------------
Saludos,
Roberto Andrade Fonseca
--------- Pie de mensaje --------------------------------
Visite: http://tlali.iztacala.unam.mx/~randrade/perl.shtml
Cancelar inscripcion:
mail to: majordomo@tlali.iztacala.unam.mx
text : cancelacion perl