corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » PHP Popup Window » Post Reply

Post Reply
Who Can Post? All users can post new topics and all users can reply.
Icon:
Formatting Mode:
Normal
Advanced
Help

Insert Bold text Insert Italicized text Insert Underlined text Insert Centered text Insert a Hyperlink Insert Email Hyperlink Insert an Image Insert Code Formatted text Insert Quoted text
Message:
HTML is Off
Smilies are On
BB Code is On
[img] Code is On
Post Options: Disable smileys?
Turn BBCode off?
Receive email notification of new replies?

Steve

posted on 1st Apr 07 at 23:07

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]


liamC

posted on 1st Apr 07 at 22:15

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

posted on 1st Apr 07 at 22:13

autotrader uses javascript popup windows, probably your best and easiest way


liamC

posted on 1st Apr 07 at 22:11

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]