Buckaroo Buddha has asked for the wisdom of the Perl Monks concerning the following question:
and recieve a dropdown<form action="foo.asp"> <!--#include virtual="/actest/vtt/includes/DateDropdownSelector.a +sp" --> <% &amp;Month_Dropdown("D1"); %> </form>
the hash table is in place so i can eventually figure out how to create a dropdown pair on which the number of available days changes based on the month that is selected maybe i shouldn't be including the file as a virtual include but should instead put a 1; at the bottom and say<% sub Month_Dropdown ($prefix) { my @month_order = ("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG" +,"SEP","OCT","NOV","DEC"); my %month_days = ( JAN => 31, FEB => 29, MAR => 31, APR => 30, MAY => 31, JUN => 30, JUL => 31, AUG => 31, SEP => 30, OCT => 31, NOV => 30, DEC => 31 ); $response->write(qq!<select name="! . $prefix . qq! _MONTH">!); foreach $month (@month_order) { $response->write(qq! <option value="$month">$month! +); }; $response->write(qq!</select>!); $response->write(qq!<select name="! . $prefix . qq! _DAY">!); for ($i = 1;$i <= 31;$i++) { $response->write(qq! <option value="$i">$i!); }; $response->write(qq!<input type="text" name="! . $prefix . qq!_YEA +R" maxlength=4 value="2001">!); } %>
and then of course fiddle around with the internals a bit (come to think of it, just taking out the <% and %> should complete that transformation anyways ... i know there's a mega -expert out there who can get me over this last little hurdle :)require /includes/DateDropdownSelector.pm
update:
I forgot to mention that the error that i am recieving is as follows:
PerlScript Error error '80004005' (in cleanup) Can't call method "write" on an undefined value /actest/vtt/includes/DateDropdownSelector.asp, line 19
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Server Side PERLScript for building forms
by Buckaroo Buddha (Scribe) on May 23, 2001 at 00:01 UTC |