Loading ...
Sorry, an error occurred while loading the content.

[PBML] Re: Using a list in HTML

Expand Messages
  • Jeff Boes
    You can substitute an array reference for the [...] below, just put in @array . Dunno what you mean by $list, did you mean to type %list? If so, you can use
    Message 1 of 7 , Jun 12, 1999
    • 0 Attachment
      You can substitute an array reference for the [...] below, just put in
      '\@array'. Dunno what you mean by $list, did you mean to type %list? If so,
      you can use a list reference with \%list.

      > -----Original Message-----
      > From: dalekh@... [mailto:dalekh@...]
      > Sent: Saturday, June 12, 1999 1:08 PM
      > To: perl-beginner@egroups.com
      > Subject: [PBML] Re: Using a list in HTML
      >
      >
      >
      > what about an array like -
      >
      > @array
      >
      > or
      >
      > $list
      >
      >
      >
      > <001001beb47e$b21126a0$204fbbd-@mishra> wrote:
      > Original Article: http://www.egroups.com/group/perl-beginner/?start=61
      > > use CGI;
      > >
      > > print header,
      > > start_html,
      > > start_form,
      > > scrolling_list(-name=>'network',
      > > -multiple=>'true',
      > > -values=>['ethernet','token16','token4'],
      > > -labels=>{'ethernet'=>'Ethernet',
      > > 'token16'=>'Token Ring - 16MB',
      > > 'token4'=>'Token Ring - 4MB'}),
      > > end_form,
      > > end_html;
      > >
      > >
      > > > -----Original Message-----
      > > > From: dalekh@... [mailto:dalekh@...]
      > > > Sent: Friday, June 11, 1999 4:46 PM
      > > > I would like to use a list of values created from parsing a
      > quoted list
      > > > and display it in a browser using HTML. I also want the user
      > to be able
      > > > select a item in the list and perform an action against it
      > using a button.
      > > > It appears <SELECT> is the best HTML tag to use but I don't
      > know how to
      > > > input the list to the tag. Here is an example that I found
      > for the tag:
      > > > <SELECT MULTIPLE NAME="network">
      > > > <OPTION SELECTED VALUE="ethernet"> Ethernet
      > > > <OPTION VALUE="token16"> Token Ring - 16MB
      > > > <OPTION VALUE="token4"> Token Ring - 4MB
      > > > <OPTION VALUE="localtalk"> LocalTalk
      > > > <OPTION VALUE="other"> Other...
      > > > </SELECT>
      > > >
      > > > Any suggestions?
      > > > thanks
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > ------------------------------------------------------------------------
      > > > What's everyone looking at? Check out the Top40 most requested stocks!
      > > > Plus quotes, charts, news, portfolios, mutual funds, and discussion.
      > > > All free, fast, and easy. Visit:
      http://clickhere.egroups.com/click/237
      > >
      > >
      > > eGroups.com home: http://www.egroups.com/group/perl-beginner
      > > http://www.egroups.com - Simplifying group communications
      > >
      > >
      > >
      > >
      > >
      > ----
      > ~~~~~~~~~~~~~|The tusks that clashed in mighty brawls of mastodons are
      > |billiard balls./The sword of Charlemagne the Just is
      > Jeffery Boes |ferric oxide, known as rust./The grizzly bear whose potent
      > jboes@...|hug was feared by all, is now a rug./Great Caesar's bust
      > |is on the shelf, and I don't feel so well myself.
      > |"On the Vanity of Earthly Greatness", A.Guiterman
      (1871-1943)
      >
      >


      ------------------------------------------------------------------------
      FREE email Newsletters delivered right to your in-box.
      CNET, USAToday, RollingStone, and moreĀ…
      Click Here Now! http://clickhere.egroups.com/click/314


      eGroups.com home: http://www.egroups.com/group/perl-beginner
      http://www.egroups.com - Simplifying group communications





      ----
      WARNING: This message contains Thought and Thought By-Products.
      _________
      Jeff Boes <>< jboes@...
      Mur Consulting http://www.qtm.net/~jboes/


      ------------------------------------------------------------------------

      eGroups.com home: http://www.egroups.com/group/perl-beginner
      http://www.egroups.com - Simplifying group communications
    • dave@mag-sol.com
      wrote: Original Article: http://www.egroups.com/group/perl-beginner/?start=62 ... Something like this perhaps? use CGI; my %list =
      Message 2 of 7 , Jun 20, 1999
      • 0 Attachment
        <7ju452$lfa-@egroups.com> wrote:
        Original Article: http://www.egroups.com/group/perl-beginner/?start=62
        >
        > what about an array like -
        >
        > @array
        >
        > or
        >
        > $list

        Something like this perhaps?

        use CGI;

        my %list = ('ethernet'=>'Ethernet',
        'token16'=>'Token Ring - 16MB',
        'token4'=>'Token Ring - 4MB');

        print header,
        start_html,
        start_form,
        scrolling_list(-name=>'network',
        -multiple=>'true',
        -values=>[keys @list],
        -labels=>\%list),
        end_form,
        end_html;


        ------------------------------------------------------------------------

        eGroups.com home: http://www.egroups.com/group/perl-beginner
        http://www.egroups.com - Simplifying group communications
      • Tomas Lauridsen
        On 20-Jun-99 dave@mag-sol.com wrote: If i paste this program to a file and run it, then I just get: No comma allowed after filehandle at ./form.pl line 9. why
        Message 3 of 7 , Jun 20, 1999
        • 0 Attachment
          On 20-Jun-99 dave@... wrote:

          If i paste this program to a file and run it, then I just get:

          No comma allowed after filehandle at ./form.pl line 9.

          why and what to do?

          > use CGI;
          >
          > my %list = ('ethernet'=>'Ethernet',
          > 'token16'=>'Token Ring - 16MB',
          > 'token4'=>'Token Ring - 4MB');
          >
          > print header,
          > start_html,
          > start_form,
          > scrolling_list(-name=>'network',
          > -multiple=>'true',
          > -values=>[keys @list],
          > -labels=>\%list),
          > end_form,
          > end_html;

          ----------------------------------
          E-Mail: Tomas Lauridsen <trol@...>

          Love thy neighbor, tune thy piano.

          ----------------------------------

          ------------------------------------------------------------------------

          eGroups.com home: http://www.egroups.com/group/perl-beginner
          http://www.egroups.com - Simplifying group communications
        • dave@mag-sol.com
          wrote: original article:http://www.egroups.com/group/perl-beginner/?start=65 ... Sorry about that. The corrected code is
          Message 4 of 7 , Jul 15, 1999
          • 0 Attachment
            <xfmail.990620200020.tro-@...> wrote:
            original article:http://www.egroups.com/group/perl-beginner/?start=65
            >
            > On 20-Jun-99 dave@... wrote:
            >
            > If i paste this program to a file and run it, then I just get:
            >
            > No comma allowed after filehandle at ./form.pl line 9.
            >
            > why and what to do?

            Sorry about that. The corrected code is below...


            > > use CGI qw/:standard/;
            > >
            > > my %list = ('ethernet'=>'Ethernet',
            > > 'token16'=>'Token Ring - 16MB',
            > > 'token4'=>'Token Ring - 4MB');
            > >
            > > print header,
            > > start_html,
            > > start_form,
            > > scrolling_list(-name=>'network',
            > > -multiple=>'true',
            > > -values=>[keys %;list],
            > > -labels=>\%list),
            > > end_form,
            > > end_html;



            ------------------------------------------------------------------------

            eGroups.com home: http://www.egroups.com/group/perl-beginner
            http://www.egroups.com - Simplifying group communications
          Your message has been successfully submitted and would be delivered to recipients shortly.