Skip Menu |

This queue is for tickets about the Win32-IE-Mechanize CPAN distribution.

Report information
The Basics
Id: 8906
Status: stalled
Priority: 0/
Queue: Win32-IE-Mechanize

People
Owner: abeltje [...] cpan.org
Requestors: andrew.peters [...] npower.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.006
Fixed in: (no value)



Subject: Problem with SELECT tags
Hi Abe Thanks for a fantastically useful module. WWW-Mechanise broke for some reason, and this saved my bacon! When using this with IE6, I couldn't get a SELECT/OPTION field to work. I stepped through the code and eventually found that the IE property "value" used in the select_value method of the Input class needed to be "text". Thus for ( my $i = 0; $i < $input->{options}->{length}; $i++ ) { $input->options( $i )->{selected} = exists $vals{ $input->options( $i )->{value} }; } becomes for ( my $i = 0; $i < $input->{options}->{length}; $i++ ) { $input->options( $i )->{selected} = exists $vals{ $input->options( $i )->{text} }; } Thanks Andrew
[guest - Wed Dec 15 06:05:30 2004]: Show quoted text
> Hi Abe
Hi Andrew, Show quoted text
> Thanks for a fantastically useful module. WWW-Mechanise broke for some > reason, and this saved my bacon!
Thanks, but most of the credit should go to Andy for creating WWW::Mechanize! Show quoted text
> When using this with IE6, I couldn't get a SELECT/OPTION field to > work. > I stepped through the code and eventually found that the IE property > "value" used in the select_value method of the Input class needed to > be "text".
Thanks for the investigation, but I'm not convinced this change is right. The current code sets selected item(s) by *value*. I think that is the most sensible thing to do as the value attribute in the option tag is the one being sent to the server. Use the value(s) to set option(s) in a select: $ie->field( select_name => 'value' ); Show quoted text
> Thus > > for ( my $i = 0; $i < $input->{options}->{length}; $i++ ) { > $input->options( $i )->{selected} = > exists $vals{ $input->options( $i )->{value} }; > } > > becomes > > for ( my $i = 0; $i < $input->{options}->{length}; $i++ ) { > $input->options( $i )->{selected} = > exists $vals{ $input->options( $i )->{text} }; > }
Sorry, but not applied. Thanks for your interrest and work + Good luck, Abe Timmeman