GET ME OFF THIS LIST

Thomas_M wrote:

> Roland Corbet [mailto:[EMAIL PROTECTED]] wrote:
> >
> > I am using HTML::Parser to re-set the values of forms.  I
> > have done this
> > successfully, for checkboxes, text areas, and text objects.
> >
> > Could anyone suggest a way of approaching the method of going
> > through all
> > the items (<option>) and then setting the necessary ones as
> > selected?  The
> > others have been fairly straight forwards, being dingle tags,
> > or can have
> > the data tagged on at the end.  The <select>, having many
> > start tags poses a different problem.
>
> Here's one way:
>
> In your start method, check if the tag is <option>. If so, push it onto a
> @save list instead of outputting the tag. You can set a global $OPTION flag
> so the other callback methods know you are currently in an <option> tag.
>
> In your text method, if the $OPTION flag is set, do whatever check you need
> to determine if this is a selected option. If so, find your <option> tag in
> the @save stack and replace it with <option selected> or whatever you want.
>
> In your end method, if the $OPTION flag is set, output the contents of the
> @save list, clear the $OPTION flag, and output the end tag as usual.
>
> --
> Mark Thomas                    [EMAIL PROTECTED]
> Sr. Internet Architect         User Technology Associates, Inc.
>
> $_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;
>
>
> _______________________________________________
> Perl-Win32-Web mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

--
_______________________________________________
G o B o u n d l e s s - Innovators of Mobile Business

Address    L�stmakargatan 2 - Stureplan , S-111 44 Stockholm, Sweden
Phone      +46 (0)733 15 15 00
Facsimile  +46 (0)733 15 15 01
E-mail     [EMAIL PROTECTED]
Internet   www.goboundless.com

Christopher Berg - Programmer/Developer
Cell       +46 (0)733 15 15 12
E-mail     [EMAIL PROTECTED]

_______________________________________________
This message may contain confidential and/or privileged
information. If you are not the addressee or authorized to
receive this for the addressee, you must not use, copy,
disclose or take any action based on this message or any
information herein. If you have received this message in
error, please advise the sender immediately by reply e-mail
and delete this message.


_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to