Try replacing
-values=>'\@contacts'
with -values=>$contacts.
It already looks like you are retrieving the values as an array ref, and by
single quoting the @contacts array, you are passing a string literal, which
is what you are seeing in your web page.
Brian
zbuckholz@hotmai
l.com To: [EMAIL PROTECTED]
cc:
05/30/02 01:28 Subject: [cgiapp] help with
scrolling_list and htmltmpl from
AM cgiapp
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/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]