I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2005-11-23 12:34:48-08 by jstenzel
How to read all options of a select control?
Hello,

is it possible to make W32::IE::M objects provide a list of all options in a certain select control?

I'm refilling select controls with new options by Javascript handlers and want to check if this operation succeeds.

Thanks in advance

Jochen Stenzel
Direct Responses: 1405 | Write a response
Posted on 2005-11-25 11:01:51-08 by abeltje in response to 1389
Re: How to read all options of a select control?
Hi Jochen,

This is not possible through the WIM interface, but you can try the IE automation API (untested):

my $select = $ie->current_form->find_input( 'selectname', 'select' ) or die "'selectname' not found +"; my $sel_ole = $$select; # Get the OLE object for ( my $i = 0; $i < $sel_ole->options->length; $i++ ) { printf "option value = '%s'\n", $sel_ole->options( $i )->value; }
See also: http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/select.asp
Mind you, this is *undocumented* behaviour, and access to the OLE objects will change in future!

HTH,
-- Abe.
Direct Responses: Write a response