Professional Web Applications Themes

Nested dynamic list + horizontal looper - Macromedia Dynamic HTML

Is there a way to make a nested dynamic list where the nested part is a table (with, let's say 5 columns), dynamically created with the horizontal looper server behavior? I want to display a series of small photos of employees, listed by department (usintg ADDT server behaviors). So the master repeat region is the department. The nested part repeat region is the 5 column table with the picture of the employee. Any help will be greatly appreciated....

  1. #1

    Default Nested dynamic list + horizontal looper

    Is there a way to make a nested dynamic list where the nested part is a table
    (with, let's say 5 columns), dynamically created with the horizontal looper
    server behavior?

    I want to display a series of small photos of employees, listed by department
    (usintg ADDT server behaviors). So the master repeat region is the department.
    The nested part repeat region is the 5 column table with the picture of the
    employee.

    Any help will be greatly appreciated.

    Erik61 Guest

  2. #2

    Default Re: Nested dynamic list + horizontal looper

    What language?
    I have some code that works for PHP if thats what your using.
    MikeL7 Guest

  3. #3

    Default Re: Nested dynamic list + horizontal looper

    Yes, PHP would be fine.
    Thanks,
    Erik
    Erik61 Guest

  4. #4

    Default Re: Nested dynamic list + horizontal looper

    Here is the code it includes a simple rs that you can change for your use. The
    $cols variable can be changed to set the number of columns in your table.
    <?PHP $dbhost = 'host'; $dbuser = 'user'; $dbpassword = 'password'; $dbdatabase
    = 'photos'; $db = mysql_connect($dbhost, $dbuser, $dbpassword);
    mysql_select_db($dbdatabase, $db); $picturelocsql = 'SELECT * FROM images;';
    $picturelocres = mysql_query($picturelocsql); echo '<table
    cellpadding='10'><tr>'; // initialize cell counter $pos = 0; // specify number
    of pictures per row $cols = 4; while($picrow =
    mysql_fetch_assoc($picturelocres)) { // increment the counter $pos++; $picture
    ..= '<td><img src='Thumbs/' . $picrow['name'] . ''></td>'; // if at end of row
    and records remain, insert row tags if ($pos%$cols === 0 &amp;&amp;
    is_array($picrow)) { $picture .= '</tr><tr>'; } } // fill in any empty cells
    in final row while ($pos%$cols) { $picture .= '<td>&amp;nbsp;</td>'; $pos++; }
    echo $picture; echo '</tr></table>'; ?>

    MikeL7 Guest

Similar Threads

  1. Can Horizontal Looper 2 do that?
    By ButBi in forum Dreamweaver AppDev
    Replies: 1
    Last Post: January 18th, 06:24 AM
  2. Horizontal Looper not working in CS3
    By Axius in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 6
    Last Post: June 5th, 04:52 PM
  3. Horizontal looper - dynamic column #
    By steven_c in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: January 25th, 12:31 AM
  4. Horizontal Looper extension for MX?
    By Nathon Jones in forum Dreamweaver AppDev
    Replies: 6
    Last Post: March 14th, 11:18 AM
  5. Horizontal Looper for MX
    By Paul in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 14th, 03:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139