----- Original Message -----
From: "Sabherwal, Balvinder (MBS)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 18, 2002 8:10 AM
Subject: RE: [cgiapp] how do I do this??


> I have a variable $dir to which I assign a value "c:\\sysmondb" in my
mode1.
> When the user submits the form, I want to append the value to the $dir.
>
> For this reason, I am trying to create a hidden field in the form and want
> to asign the value of $dir to this hidden field. I have tryed the follwing
> way's of doing this
>
> 1 $output .= $q->hidden(-name => 'dir', -value =>\$dir );
> 2 $output .= $q->hidden(-name => 'dir', -value => "$dir" );
> 3 $output .= $q->hidden(-name => 'dir', -value => '$dir' );
> 4 $output .= $q->hidden(-name => 'dir', -value => {$dir} );

Line 4 assigns an anonymous hash ref to value.  You do not need any quotes
at all. and the fact that it is looking for $startloc would suggest that you
are using single quotes around '$startloc' in your open statement which is
incorrrect.  I would suggest backing up and learning the basics first.  You
will save yourself much time and aggravation in doing so.

http://search.yahoo.com/bin/search?p=perl+tutorial

>
> The 4 line caused an internal error where as 1 , 2 and 3 sent the variable
> name as the value for the hidden field insted of sending the value inside
> the $dir.
>
> How I accomplish this. All I am trying to do is to create an application
> whoch allows a user the navigate through a directory tree and display's
the
> file user select at the end.
>
> Thanks
> Bal.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to