If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > Div in an while loop

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-08-09, 11:31
Muiter Muiter is offline
Registered User
 
Join Date: Dec 2008
Location: Netherlands
Posts: 56
Div in an while loop

Code:
<?php
<td class="dr" colspan="10"> <div id="details"> </div> </td>
?>
This div above from the code below is always shown belows my first line in the table instead of below each line where it belongs to. What is wrong?
(the div is filled bij AJAX)

When I use tis the part xxxxxxx is below each line as it should.
Code:
<?php
<td class="dr" colspan="10"> <div id="details"> xxxxxxx </div> </td>
?>
Part of code:
Code:
<?php
while ($row = mysql_fetch_array($res))
		{
			if ($row['actief'] == "ja")
			{
			echo 
				'<tr onmouseover="this.className=\'dr_highlight\'" onmouseout="this.className=\'dr\'" onclick="showDetails('.$row['id'].')" class="dr">
				<td><a href=adres_edit.php?id='.$row['id'].' title="Bewerk item"><img border="0" src="images/icon/edit.png"</a>&nbsp;&nbsp;<a href=contactpersoon.php?id='.$row['id'].' title="Bekijk contactpersonen"><img border="0" src="images/icon/contacts.png"</a></td>
				<td>'. htmlentities( $row['klantnaam'] ).'</td>';
			if ($row['aflever_adres']==$row['adres'])
			echo
				'<td width="150">'.$row['aflever_adres'].'</td>';
			else
			echo
				'<td width="150">'.$row['aflever_adres'].' <br /> '.$row['adres'].'</td>';
				
			if ($row['aflever_postcode']==$row['postcode'])
			echo
				'<td>'.$row['aflever_postcode'].'</td>';
			else
			echo
				'<td>'.$row['aflever_postcode'].' <br /> '.$row['postcode'].'</td>';
			
			if ($row['aflever_plaats']==$row['plaats'])
			echo
				'<td>'. htmlentities( $row['aflever_plaats'] ).'</td>';
			else
			echo
				'<td>'. htmlentities( $row['aflever_plaats'] ).' <br /> '. htmlentities( $row['plaats'] ).'</td>';
			
			if ($row['aflever_land']==$row['land'])
			echo
				'<td>'. htmlentities( $row['aflever_land'] ).'</td>';
			else
			echo
				'<td>'. htmlentities( $row['aflever_land'] ).' <br /> '. htmlentities( $row['land'] ).'</td>';
			echo
				'<td width="125">'.$row['tel'].'</td>
				<td width="125">'.$row['fax'].'</td>
				<td><a href="mailto:'.$row['email'].'" title="Verstuur e-mail">'.$row['email'].'</a></td>
				<td><a href="'.$row['www'].'" title="Bezoek website" target="_blank">'.$row['www'].'</a></td>
				<td>'.$row['betalingstermijn'].'</td>
			</tr>
			<tr>
				<td class="dr"></td>
				<td class="dr" colspan="10"> <div id="details"> </div> </td>
			</tr>';
			}
			else
?>
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On