Re: [cgiapp] help with scrolling_list and htmltmpl from cgiapp

2002-05-30 Thread Gerard ter Haar

Hi,

I guess the assignment have not been made correctly because of the single quotes. My 
guess
would be this line:
my $contact_list = $q-scrolling_list(-name='contacts',
  -values=\@contacts,
  -multiple='true');

Kind regards,

Gerard


 I have been trying to generate a page based on the code fragment below. But
 when the page appears I get the scrolling_list on the page, but the value
 inside the list is \@contacts.
 
 I must be doing something wrong because the docs say I can pass an array
 reference as I am doing.
 
 Can anyone point out my mistake?
 
   my $select_contacts_query = SELECT contact_email
 FROM monitor_contact
 WHERE mc_id =
 $account_id;
 my $sth = $dbh-prepare($select_contacts_query);
 $sth-execute();
 my $contacts = $sth-fetchall_arrayref();
 
 my $contact_list = $q-scrolling_list(-name='contacts',
 -values='\@contacts',
 -multiple='true');
 
 $tmpl_obj-param(CONTACTS = $contact_list);
 
 $tmpl_obj-param(ADD_URL=1);
 
 return $tmpl_obj-output;
 
 Thanks
 
 Zack
 
 -
 Web Archive:  http://www.mail-archive.com/cgiapp@lists.vm.com/
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
Web Archive:  http://www.mail-archive.com/cgiapp@lists.vm.com/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [cgiapp] help with scrolling_list and htmltmpl from cgiapp

2002-05-30 Thread Mark Koopman


 Try replacing

  -values='\@contacts'

 with -values=$contacts.


yet another reason to get into the habit of 'use strict';

-- 
Mark Koopman  WebSideStory San Diego CA 92121
.
perl -e 'print chr hex(/8/?0A:/[afebc]/?4$_:/[D4-7A]/?ord
$_:.41+$_)for q,a756-210ef6DA4-219A4c-21D02bA48,=~/-..|./g'



-
Web Archive:  http://www.mail-archive.com/cgiapp@lists.vm.com/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]