• Horn Player – Computer Dude – Gig Pig …
  • Home
  • About
  • Blog
  • Services
  • Contact
  • Webmail
  • Terms

Robert A. Owen - Musician - Network Engineer - Support Master

Music, Technology, Rants and Funnies - Randomness at its best!

  • Blog
  • Internet
    • IIS 6
    • IIS 7.5
    • Javascript
    • Web Design
      • WordPress
      • Coldfusion
  • Support
    • MicroSoft
      • Powershell
      • Surface
      • Windows10
      • Zune
    • PC-Care
    • Software
    • Virus
      • Email Scam
    • Vista Quest
    • Windows 7
  • Pictures
    • Instagram
  • Music
  • Friday Funnies
  • General
    • CoWorking
    • Gadgets
    • Politico
    • Random – TidBit
    • Rant
    • Review
    • Site of the Week
    • Useless
    • Xbox
      • Games
  • April 20, 2018
You are here: Home / Coldfusion / Simple Pop-up: Fuel

Simple Pop-up: Fuel

January 1, 2007 By Robert Owen Leave a Comment

Weird title, huh?! Well, last time I showed you all the code I like to use for Simple pop-up Windows. Really simple and easy to use.

This window is useful when you are displaying product details, Biographical details etc. Really, anytime you are returning a list and you want to save space on the main page.

To Fuel this window you need to start with the main page of info. For example, we have these products listed on our page:

Lets pretend that we want the user to be able to click these images to get more information or price. When we create those images we need our link to pass some product specific info to our pop-up page.. Item number for example. So the link from these images would look something like this:

<a href=”javascript:pop(’product-detail.cfm?itemID=5′)”>

Ok, great. We’ve got the info in place to call the page. Now, we just need to create one “detail” page for all the products to use. Just create a new ‘cfm’ document with the following:

<cfquery name=”getDetail” datasource=”#Application.DSN#”>
Select *
from Products
where itemID =  #url.itemID#
</cfquery>

<html>
<head>

<cfoutput>
<title>#getDetail.itemName# made by #getDetail.itemManufacturer#
</title>
</cfoutput>

</head>

<body>

<cfoutput query=”getDetail”>

<table width=”98%”  border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td><img src=”images/#picture#” alt=”#itemNumber# #itemName# – #itmeManufacturer#” title=”#itemNumber# #itemName# – #itmeManufacturer#” border=”1″ align=”left”>&nbsp;<strong>#itemNumber# #itemName# – #itmeManufacturer#</strong>
<cfif Quantity LT “1″>- Currently out of stock</cfif>

<p class=”main”>#description#</p>
</td>
</tr>
</table>

</cfoutput>

<div align=”center” class=”main”><a HREF=”javascript:void(0);” onClick=”window.close(’profile’);”>
Close Window </a></div>

</body>
</html>

And that is it.. Just pass the item number in the hyperlink to this page and the initial query will pull the item detail. This is pretty quick and dirty and there are probably better ways to do this but, this will give you a starting point.

Notice the bit of javascript at the bottoom:

<a HREF=”javascript:void(0);” onClick=”window.close(’profile’);”>
Close Window </a>

That will give you a close window link.

© 2007 – 2009, Robert Owen. All rights reserved.

Related Posts Plugin for WordPress, Blogger...

Filed Under: Coldfusion Tagged With: Ali, Amp Nbsp, Biographical Details, Cfif, Cfoutput Query, Cfquery Name, Com Blog, Div Align Center, E2, Href Javascript, Images, Img Src, Javascript Pop, Last Time, Lt 1, Pop Up Windows, Product Detail, Product Details, Stock, Td, Weird Title

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Robert Owen A Horn Player turned salesman, turned Computer Consultant & Horn Player, Turn Network Engineer & Horn Player.... Well, How about a Horn player who does a lot of other stuff? More about me. FacebookGoogleLinkedInTwitter

To Stay up-to-date on all of my crazy Ramblings, enter your e-mail address below.

You'll be amazed!

Recent Posts…

  • Instagram Photos
  • Time for more Pictures
  • Windows 10 – Forget Wireless Network
  • Powershell to check and start a service
  • Its Amazing – Shia LaBeouf

Recent Comments…

  • Gravatar icon of Ann Marie Andrews Ann Marie Andrews
    March 1, 2018 (6:35)
    Use the Snipping Tool to Capture Menus This seems to be working for everyone but me! ...
  • Gravatar icon of Casey Casey
    November 30, 2017 (9:58)
    Use the Snipping Tool to Capture Menus Thank you!! Just spent 15 minutes trying to fin...
  • Gravatar icon of Raymond Raymond
    November 10, 2017 (7:26)
    Use the Snipping Tool to Capture Menus It works for me on Windows 10.

Flickr Pictures

  • A photo on Flickr
  • A photo on Flickr
  • A photo on Flickr
  • A photo on Flickr
  • A photo on Flickr
  • A photo on Flickr

Latest Tweets…

  • My fitbit #Fitstats_en_US for 4/13/2018: 7,793 steps and 3.3 miles traveled. https://t.co/LM41yFcxKa April 14, 2018 2:02 pm
  • My fitbit #Fitstats_en_US for 4/01/2018: 2,886 steps and 1.2 miles traveled. https://t.co/LM41yFcxKa April 2, 2018 5:03 am
  • My fitbit #Fitstats_en_US for 3/30/2018: 5,322 steps and 2.3 miles traveled. https://t.co/LM41yFcxKa March 31, 2018 2:02 pm

Contact Us…

Phone: (865) 919.7300
Email: webHelp@owenwebs.com

Connect on the Social Scene:
  • Facebook
  • Flickr
  • Google+
  • Instagram
  • Linkedin
  • Twitter
  • YouTube

Content Copyright © 2018 OWEN CONSULTING · All Rights Reserved · Log in