Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Red
- Yellow
- Orange
- Blue
- Black
- Brown
- Green
- White
- <div>
- <% $color_selector %>
- </div>
- my %all_colors = (
- 1 => 'Red',
- 2 => 'Yellow',
- 3 => 'Orange',
- 4 => 'Blue',
- 5 => 'Black',
- 6 => 'Brown',
- 7 => 'Green',
- 8 => 'White',
- );
- my $color_selector = '<select name="all_colors">';
- foreach my $color (sort {$all_colors{$a} cmp $all_colors {$b}} keys %all_colors ) {
- $color_selector .= qq~<option value="$color">$all_colors{$color}</option>~;
- }
- $color_selector .= '</select>';
- use constant MAIN_COLORS => {
- 1 => 'Red',
- 2 => 'Yellow',
- 3 => 'Orange',
- 4 => 'Blue',
- };
- sub main_colors {
- return keys %{MAIN_COLORS()};
- }
- <div>
- <input type="checkbox" name="maincolors" value="1" class="inputCheckbox" /> Main Colors
- <input type="checkbox" name="resetofcolors" value="1" class="inputCheckbox" /> Rest of the Colors
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement