liamC
Member
Registered: 28th Feb 04
User status: Offline
|
I have a vehicle database which lists all the vehicles in the database.
Each vehicle obviously has an ID.
The table below lists the Make, Model, Engine Size, Year and Colour of the vehicle in the database.
code: <?php do { ?>
<tr>
<td width="19%" height="20" bgcolor="#CCCCCC"><span class="style16"><?php echo $row_ListallUsed['MAKE']; ?></span></td>
<td width="20%" bgcolor="#CCCCCC"><span class="style16"><?php echo $row_ListallUsed['MODEL']; ?></span></td>
<td width="20%" bgcolor="#CCCCCC"><span class="style16"><?php echo $row_ListallUsed['ENGINE']; ?></span></td>
<td width="21%" bgcolor="#CCCCCC"><span class="style16"><?php echo $row_ListallUsed['COLOUR']; ?></span></td>
<td width="20%" bgcolor="#CCCCCC"><span class="style16"><?php echo $row_ListallUsed['YEAR']; ?></span></td>
</tr><?php } while ($row_ListallUsed = mysql_fetch_assoc($ListallUsed)); ?>
</table>
When all the rows of vehicles in the database is listed, I want to make it so that when a user clicks on a row, a popup of that vehicle showing the rest of the data for that row (Description, Location etc) is shown.
I want it a bit like Autotraders popup window.
I think basically I just need the code for the popup window, as it'll probably be, depending which row the user clicks the URL goes to www.domain.com/carview.php?ID=3?
Could anyone help out?
[Edited on 01-04-2007 by liamC]
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
autotrader uses javascript popup windows, probably your best and easiest way
|
liamC
Member
Registered: 28th Feb 04
User status: Offline
|
I don't mind whichever language mate, but the rest of the site is PHP etc, so I presume it may be better using PHP? Or does it not matter?
I just need the code to recognise which ID the vehicle is so it can generate it within the link and make it into a popup.
I think that's all there is to it off the top of my head, but not that clued up on this TBH.
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
php is used for generating content, php will generally output nothing to your browser until you integrate what you have generated in php with html or javascript etc
all of what you posted above is html, with a some php to generate content for the html.
you use javascript to make the popup to your target php page.
[Edited on 01-04-2007 by Steve]
[Edited on 01-04-2007 by Steve]
|