dhtml within php

From: Date: Thu, 22 May 2003 21:01:25 +0000
Subject: dhtml within php
Groups: php.db 
Request: Send a blank email to php-db+get-27972@lists.php.net to get a copy of this message
Hello, I'm working on a web page that displays the tables of a database and their contents. The php script for accessing the database and displaying the tables is in place. Now I want to manipulate the web page layout so that the db tables are displayed in a series of folders with tabs, with the current table being visible. I can't get the right syntax for printing out <div>s within a php loop. Here's what I have ... for($i = 1; $i=$tableLayout->ntab;$i++) {
          // create tabs
          print('<div id="Tab[$i]" class="tab"
                   style="position:absolute; left:80*[$i]px; top:185px; width:80px;
                              height:20px; z-index:1; visibility:visible">
                 <a href="javascript:turnOn('Tab[$i]','Folder[$i]')">Table 1</a>
          print('</div>');
The code for the folders containing the db tables is similar. The function turnOn() is defined in the header, along with a javascript function for switching tabs and tables when the user clicks a tab. Is this a big syntax problem, or do I need to take a different approach? Thanks, Robbie -- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Robbie Staufer NCAR/SCD 1850 Table Mesa Dr. Rm. 42 Boulder, CO. 80305 (303) 497-1836

« previous php.db (#27972) next »