perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Rayner" <dray...@savicom.net>
Subject <select> within <table>??
Date Thu, 12 Feb 2004 23:34:23 GMT
I am trying to include a <select> tag in a cell of a table whose
rows/columns are being generated using the $row and $col variables.  It does
not seem to work.  The first row of the table is re-generated $maxrow times.
I have not referenced $row inside the <select> (although I would like to do
this!).  Is this supported?  Is there some trick to make it work?

Sample code below...

Thanks and regards,

Doug Rayner
Senior System Architect
Savicom: Next Generation eMail Marketing
http://www.savicom.net
(415) 617-9006



===================================================================
<htmt>
<body>
<script language="epl">
[-
  $title = 'Add Recipients';

  my $files = $fdat{fileSelector};
  if (!defined($files)) {
    $files = 1;
    $fdat{fileSelector} = $files;
  }

  $maxrow = 10;
  if ($files eq 'manual' || $files == 1) {
    $table[0][0] = '';
  }
  else {
    my $f = 1;
    my $rows = $files / 2;
    for (my $r = 0; $r < $rows; $r++) {
      $table[$r][0] = $f++;
      $table[$r][1] = $f++;
    }
  }

  $sourceOption[0] = 'Make Selection';
  $sourceOption[1] = 'Acme Vending';
  $sourceOption[2] = 'ABC Rental';

-]
</script>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="ltAlign">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="80%" class="breadCrumbs">Audience &gt; Multiple
Upload</td>
          <td width="20%" class="rcJustify">
            <form name="fileSelectorForm" method="post">
              <select name="fileSelector"
onChange="fileSelectorForm.submit()" class="controlText">
                <option value="manual">Manual Upload</option>
                <option value="1">Single File Upload</option>
                <option value="2">Multiple Upload: 2 Files</option>
                <option value="4">Multiple Upload: 4 Files</option>
                <option value="6">Multiple Upload: 6 Files</option>
                <option value="8">Multiple Upload: 8 Files</option>
                <option value="10">Multiple Upload: 10 Files</option>
              </select>
            </form>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="textRowSpacer15">&nbsp;</td>
  </tr>
  <tr>
    <td width="100%" class="thdPage">Upload Audience</td>
  </tr>
  <tr>
    <td width="100%">
      <table width="100%" border="1" cellspacing="2" cellpadding="0">
        <tr>
          <td class="cellBorder">
            [- $file = $table[$row][$col] -]
            <table width="100%" border="0" cellspacing="2" cellpadding="0">
              <tr>
                <td class="ltAlign">
                  <table width="100%" border="0" cellspacing="2"
cellpadding="0" name="filesourcetable">
                    <tr>
                      <td class="thdPage2ndLevel">Upload File [+ $file
+]</td>
                    </tr>
                    <tr>
                      <td width="42%" class="text">&nbsp;</td>
                    </tr>
                    <tr>
                      <td width="42%" class="text">Browse for File to
Upload</td>
                    </tr>
                    <tr>
                      <td>
                        <input type="File" name="add_file_[+ $file +]"
size="35" value="" class="text">
                      </td>
                    </tr>
                    <tr>
                      <td width="42%" class="text">&nbsp;</td>
                    </tr>
                    <tr>
                      <td width="42%" class="text">Website</td>
                    </tr>
                    <tr>
                      <td width="42%" class="text">
                        <select name="source" class="text">
                          <option>Make Selection</option>
                        </select>
<!--
                        <select name="source" class="text">
                          <option>[+ $sourceOption[$row] +]</option>
                        </select>
-->
                      </td>
                    </tr>
                    <tr>
                      <td width="42%" class="text">&nbsp;</td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message