corsasport.co.uk
 

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


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author PHP Popup Window
liamC
Member

Registered: 28th Feb 04
User status: Offline
1st Apr 07 at 22:11   View User's Profile U2U Member Reply With Quote

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

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
1st Apr 07 at 22:13   View Garage View User's Profile U2U Member Reply With Quote

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

Registered: 28th Feb 04
User status: Offline
1st Apr 07 at 22:15   View User's Profile U2U Member Reply With Quote

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

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
1st Apr 07 at 23:07   View Garage View User's Profile U2U Member Reply With Quote

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]

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Help computer peeps! Recaro1 General Chat 16 829
10th Nov 03 at 11:45
by cdcool1
 
Problem with JavaScript Windows. Tiger General Chat 10 618
29th Nov 04 at 17:19
by Joff
 
Small forum suggestion? drunkenfool General Chat 4 502
21st Feb 05 at 16:18
by jozza
 
Popup blocking on CS CorsAsh General Chat 4 634
9th Jun 05 at 00:24
by loafofbrett
 
U2U messenger C6DSY General Chat 12 540
7th Jan 06 at 08:01
by Ian
 

Corsa Sport » Message Board » Off Day » Geek Day » PHP Popup Window 28 database queries in 0.0147181 seconds