Make sure you take the space out from between the pipes in
Code:
open(SELECT,"/path/to/list/file") | | die "Can't open file";
the board puts them there.
replace "/path/to/list/file" with the complete PATH, not URL, to the relevant text file. The text file should be formatted as this:
Code:
selection 1
selection 2
selection 3
with a carriage return after each item. Make sure that the permissions are set correctly on these files (644).
Code:
<TABLE WIDTH="450" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#80B8DF">
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font>ID:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="ID" VALUE="$rec{'ID'}" SIZE="3" MAXLENGTH="3"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Customer:</FONT></TD>
<TD VALIGN="TOP"> |; print &build_select_field ("Customer", "$rec{'Customer'}"); print qq|</TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Location: </FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Location" VALUE="$rec{'Location'}" SIZE="27" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Device Name:</FONT></TD>
<TD VALIGN="TOP">|;
open(SELECT,"/path/to/list/file") | | die "Can't open file";
@device_list = (<SELECT> );
close (SELECT);
print qq|<select name="Device_name">|;
foreach (@device_list) {
chomp $_;
print "<option";
print " SELECTED" if ($rec{'Device_name'} eq "$_");
print ">$_\n";
}
print qq|</select>
</TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Node Type:</FONT></TD>
<TD VALIGN="TOP"> |;
open(SELECT,"/path/to/list/file") | | die "Can't open file";
@node_list = (<SELECT> );
close (SELECT);
print qq|<select name="Node_type">|;
foreach (@node_list) {
chomp $_;
print "<option";
print " SELECTED" if ($rec{'Node_type'} eq "$_");
print ">$_\n";
}
print qq|</select>
</TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Ignore Type:</FONT></TD>
<TD VALIGN="TOP"> |; print &build_radio_field ("Ignore_type", "$rec{'Ignore_type'}"); print qq|</TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Interface Number:</FONT></TD>
<TD VALIGN="TOP"> |; print &build_select_field ("Interface_number", "$rec{'Interface_number'}"); print qq|</TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Date:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Date" VALUE="$rec{'Date'}" SIZE="12" MAXLENGTH="12"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Time:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Time" VALUE="$rec{'Time'}" SIZE="12" MAXLENGTH="12"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Description:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Description" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Description'}</TEXTAREA></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>From Date:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Date_from" VALUE="$rec{'Date_from'}" SIZE="12" MAXLENGTH="12"><TD VALIGN="TOP"><$font>To Date:</font><INPUT TYPE="TEXT" NAME="Date_to" VALUE="$rec{'Date_to'}" SIZE="12" MAXLENGTH="12"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Requested By:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Requested_by" VALUE="$rec{'Requested_by'}" SIZE="30" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Phone#:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Phone" VALUE="$rec{'Phone'}" SIZE="13" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>GMC Analyst:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="GMC_Analyst" VALUE="$rec{'GMC_Analyst'}" SIZE="30" MAXLENGTH="255"></TD></TR>
</TABLE>
|;
}
------------------
WFMY-TV Webmaster