feeds2read
Latest Flows from this sub-category:
Buy Accounting Software

Free Download SAP HR Books And Interview Questions

AnarchyJim

DRM Products and Solutions - PDF and Web Content Security Software

Stellar PhoenixAccess Recovery 3.0

Free Download SAP ABAP Books, Projects, Reports, FAQ’s

Custom Software Development

SAP ABAP Programming

4Team News: Sync2

MP3 Tags

random selection from this sub-category:
3i Infotech

Software News items, Blog posts | ZDNet

Audit Procedures Documents

Bitam - Integrated EPM Solutions

Software Reviews

DzSoft's New Software Releases

FeedYES

4Team News: Sync2

Financial Accounting Software

Windows Registry Cleaner

Rss Directory > Computer > Software > coldfusion


 


Coldfusion Tutorial: Color Picker

Description
A simple and full featured color picker. It is component based. Just create a picker.cfc file. That you can reuse. Finaly you can call this component from any where in your application.



Example

picker.cfc page

<cfcomponent>
 <cffunction name="ColorPicker" access="remote" returntype="string">
  <cfwindow name="ColorWindow" initshow="false" width="200" height="220">
   <script language="javascript">
    function thisElement(name){
     currentElement = name ;
    }
   </script>
   
   <script language="javascript">
    function selectedColor(colorValue){
     var currentColor = colorValue ;
     //document.getElementById(currentElement).value="#"+currentColor;
     document.getElementById(currentElement).style.backgroundColor="#"+currentColor;
    }
   </script>
  
   <cfset CharList="0,3,6,9,C,F">
   <cfset Counter=0>
   <cfoutput>
    <table border="0" cellspacing="1">
     <tr>
      <cfloop list="#CharList#" index="GreenColor">
       <cfloop list="#CharList#" index="BlueColor">
        <cfloop list="#CharList#" index="RedColor">
         <cfif Counter % 18 EQ 0>
          </tr><tr>
         </cfif>
         <td onmouseover="document.getElementById('codeDisplay').value ='###RedColor##RedColor##GreenColor##GreenColor##BlueColor##BlueColor#';"
          onclick="selectedColor('#RedColor##RedColor##GreenColor##GreenColor##BlueColor##BlueColor#');
             javascript:ColdFusion.Window.hide('ColorWindow');"
           title="#RedColor##RedColor##GreenColor##GreenColor##BlueColor##BlueColor#"
           style=" background-color: #RedColor##RedColor##GreenColor##GreenColor##BlueColor##BlueColor#; color: black; font-size:7px; width:7px; height: 7px; cursor:pointer">
          <a onmouseover="document.getElementById('colorDisplay').style.backgroundColor ='#RedColor##RedColor##GreenColor##GreenColor##BlueColor##BlueColor#';">   </a>
         </td>
         <cfset Counter=Counter+1>
        </cfloop>
       </cfloop>
      </cfloop>
     </tr>
     <tr>
      <td colspan="18" headers="5"></td>
     </tr>
     <tr >
      <td id="colorDisplay" colspan="9" height="15" bgcolor="" style="background-color: red;"></td>
      <td colspan="9" height="15" bgcolor=""><input type="text" value="" id="codeDisplay" style="height: 15px; width: 90px; border: none; font-size: 12px;" readonly="yes"></td>
     </tr>
    </table>
   </cfoutput>
  </cfwindow>
 </cffunction>
</cfcomponent>

   


picker.cfm this is caller page. Here you must pass the input box id to javascript.

<cfscript>
 objPicker=CreateObject("component","picker");
</cfscript>
<cfset objPicker.ColorPicker()>

<cfoutput>
<center>
<form name="oTableForm" action="" method="post">
 <table>

  <tr>
   <td colspan="2">Click the box</td>
  </tr>
  <tr>
   <td>Color 1:</td>
   <td>
    <input type="text" name="color1"   readonly="yes" value="" onfocus="javascript:ColdFusion.Window.show('ColorWindow'); thisElement('color1');" />
   </td>
  </tr>
  <tr>
   <td>Color: 2</td>
   <td><input type="text" name="color2"    readonly="yes" value="" onfocus="javascript:ColdFusion.Window.show('ColorWindow'); thisElement('color2');" /></td>
  </tr>
 </table>
</form>
</center>
</cfoutput>

   


Example Output



SEO Expert
Do you know how many web sites publish per day? Now in the internet there have billions of website. So if you publish your site then what happened? Where and how you can get your visitor? If Search Engine not indexed your site then you lose your visitors. But Search Engine optimization is not a easy task. SEO Expert can make this job easy. When you get consult from SEO Experts then your site will be more visible.



Now the question is where you can get a SEO Expert? Recently in this seo market have huge specialist. Maximum have no or little experience. SEO Expert Inc. is the top search engine optimization firm in the United States. Seo Expert doing the search engine optimization since 1998. Sean O’Brien, The founder of SEO Expert Inc. have 10+ years experience about Search Engine Optimization work. So you can easily depend on them. They performed SEO for huge startup company and big companies. So it is not a problem that you have a small or startup business. You can easily consult with this seo experts. SEO Expert Inc. always keep secret their clients information. So don’t feel any hesitation. They have experts analysts, researchers, optimizers, programmers. They know Search engine algorithm very well.



What is your business? travel? tourism? food? hotel? or others, this is not fact. Are you know how many company depends on this keyword? So if your site not on the top list in search result you must loss your visitor. That is the main fact for SEO work. For this issue you should consult with SEO Experts to optimize your desire keywords. After successful SEO you get your site top in the search result.




Search Engine Optimization
Are you finding Search Engine Optimization Companies which is specialize in website design, blog marketing, reliable web hosting, search engine high ranking and website optimization? Then you should visit the thinkbigsites.com. They offer various type of Search Engine Optimization Consulting. If you want to get high ranked website, you should consult with a search engine optimization expert. thinkbigsites.com will help you to drive more traffic for your web sites. It helps you to establish your business as a high brand in your competitive market.



thinkbigsites.com Search Engine Optimization Services are excellent. They offer free website analysis and suggest the effective path which help you to increase your web site visitors. thinkbigsites.com Company have experts web site designer, database programmer, php developer and search engine optimization specialist. So you can develop your site from this company without any hesitation.



Your websites internet visibility will increase day by day when you get the thinkbigsite.com consultant's search engine optimization support. Creative design is more important for the end user to remember it. When they choose it they will come back here again and again. thinkbigsites.com is helping you to build a creative well designed website. They have expert who build nice and attractive website which help you to bring huge visitors. They not only build static website but also build fully functional database driven dynamic web application. So it is not matter that your business is small or big. All kinds of client are welcome in thinkbigsites.com.


Homecoming Dresses
Browse Rissy Roo's incredible collection of beautiful homecoming dresses, plus size homecoming dresses, elegant homecoming dresses, and formal homecoming gowns for 2008 . Rissy Roo's selection of prom dress styles and prom dress designs will suit your every need. Cocktail dresses for all special occasions at Rissy Roo's.



Quinceanera Dresses
Shop Quinceanera dress styles from the Mori Lee Vizcaya collection, Tiffany Designs Quinceanera dresses, plus more special ball gowns that are perfect for this once in a lifetime occasion. Rissy Roo’s specialize in sophisticated plus size dresses.

Designer Shoes
Rissy Roo's carries a gorgeous variety of women's shoes and evening shoes. Shop Rissy Roo's designer shoes online or visit the showroom.




Financial solution
afsloansonline.com is one of the major financial solutions web site. afsloansonline.com give you many advantage for your financial solution such as, it has no application fee and no hidden charges. When using afsloansonline.com to assist you in obtaining unsecured personal loans, unsecured personal lines of credit, and business loans, you are using their expertise in finding you some of the lowest interest rates in the country and targeting those lenders who will approve your loan or credit line application. Only need 5 minutes for pre application and no third party submission. It takes time 24 – 48 hour approval window for most approvals.



Unsecured Personal Loans
If you need money and you aren’t in business, you can always apply for: Unsecured Personal Loans. With a personal loan or line with the help of afsloansonline.com , you can get the opportunity of no application fees, no processing charges, no closing costs, no hidden charges, no collateral, low interest rates, low interest rates on your personal unsecured line of credit, 100% guarantee, $10K- $100K personal loans available and many more. You have no obligation to accept the loan or credit line offers. If you want an unsecured loan for your home improvement purposes, you are not using your home as collateral. There is no second mortgage attached to these loans.



Unsecured Business Loans
afsloansonline.com can also help you obtain Unsecured Business Loans! Good credit is no longer a subjective term when you deal with AfsLoansOnline.com. Whatever the reason, afsloansonline.com can help you obtain small business financing. If you have a home based business and need financing, try -Home Based Business Loans . Obtain an unsecured loan to build a home office!


Rugs
Infinity Rugs is one of the best rug sales related site. infinityrugs.com have a large number of collections more over 30000 rugs. In infinityrugs.com you can see the images of various kinds of Rugs and can know the manufacturer company name, rug size, part number, description, and the price. Infinity Rugs carry two of the best rug collections on the market - Nourison 2000 and Hellenic Private Reserve. These are area carpets that Infinity Rugs consider best of breed. Infinity Rugs have also done commercial projects including hotels and offices.



Persian Rugs
Infinity Rugs have Persian Rugs from popular brands such as Morison, Hellenic, Surya, Moment, and many more. Infinity Rugs specialize in hard to get Persian rugs. Even though Persian area carpets are very hard to get, most collections you see on this site are in stock and ready to ship in just a few business days.



Hand Knotted Rugs
The rugs which you see on the Infinity Rugs are only the best quality. Many of them are Hand Knotted Rugs that are truly heirloom quality. You can’t imagine! Infinity Rugs also carry the top designers, like Calvin Klein and Candice Olson! They're made with the best wool available, and are densely hand knotted for a great feel and thickness. These are area rugs that will last for a lifetime!




Are you finding wedding dresses?
Are you finding wedding dresses? Bridal Dresses? bestbridalprices.com is one of the best wedding related site. Where you can get enough products like Wedding Dresses, Bridesmaid Dresses, Flower Girl Dresses, Bridal Veils, Prom Dresses, Quinceanera Dresses, Bridal Shoes, Wedding Accessories and many more.



In bestbridalprices.com you can see the image of various kinds of wedding dresses and know the designer name, style number, description, original price and their price. You can’t imagine! bestbridalprices.com has more over 4000 designer Bridal Gowns, over 3000 designer Bridesmaid Dresses and much more.

Wedding Dresses
bestbridalprices.com are proud to offer most extensive selections of designer Wedding Dresses anywhere. bestbridalprices.com has large inventory of gorgeous wedding gowns includes top designer names like Alfred Angelo, Maggie Sottero, Mori Lee, Davinci, Casablanca, Moonlight, Private Label by G, Allure, Amelie, Bonny, Christina Wu, Forever Yours, Watters and Watters, Raylia, and many more! 29 years of dealing wedding gowns has given them vast experience.



Bridesmaid Dresses
bestbridalprices.com collect beautiful Bridesmaid Dresses from the top Bridesmaid Manufacturers in the World. bestbridalprices.com offer some of the most spectacular Bridesmaid Dresses available anywhere from the most sought after designer brands in the world! Their unbeatable selection of discount bridesmaid dresses includes top designer names such as Alfred Angelo, Mori Lee, Dessy, Alfred Sung, After Six, Raylia, Forever Yours, Impressions, Jordan, Bill Levkoff, Joanie G, Bari Jay and many more! All of their bridesmaid dresses are available in a wide assortment of styles, fabrics and colors.





Short Breaks
Nowadays, traveling is a part of our life. Often we need a travel tour for our pleasure. It refreshes our body and mind. However, time is too short to go long time breaks. For this reason, maximum people choose short breaks. We still need help, service and advice to make our short break. At present, a lot of travel agency is available in the world. Of that travel agency, directline citybreaks are one of the best online travel agency. You can easily conform your booking in the travel tour over the internet in this web site. directline citybreaks is a large online travel-booking site.



Short Breaks - Europe
directline citybreaks arrange cheap short breaks, throughout the Europe, like Paris, Brussels, Rome, London, Amsterdam, Madrid, Prague, Budapest, Barcelona etc. In little more than a two-hour flight travelers can be sampling the delights of many of Europe's classic cities on a short break. Then you can enjoy the canals of Amsterdam, ice cream and ancient ruins in Rome, Eiffel Tower in Paris, Gothic splendor of Prague, Renaissance glories of Venice, fantastic museums and galleries. You can get low-cost flights.



Short Breaks in Rome
Many people like Rome city breaks. Rome is a city of antiquities, monuments and ancient sites. It is a paradise for art lovers. Mild winters, excellent spring, and autumn weather make city breaks in Rome popular all year round.





Hotel Reservation
prontohotel.com is a large online hotel reservations site.You can easily book your hotel room by this site throughout the world in many countries like United states, United kingdom, France, Germany, Australia , Spain, China, Italy , India , Bangladesh, Denmark , Egypt, Ireland , Japan, Romania etc. You can easily book your room over the internet. You can get various kinds of room, lowest to highest price.



You can reserve a room over this site and will have a chance to roam your choiceable city by your enable rate. prontohotel.com is a very simple and powerful site which give you full of information about hotel reservation. Every day prontohotel.com adjoin new information and become upgraded. In prontohotel.com if one fill up the name of city, check-in time and check-out time, the number of room he want to stay, then he will get his result and a rich information through the internet.



Photo Gallery
prontohotel.com includes photo gallery, so it's a great opportunity to choose your hotel. You will have a chance to see different images for a specific hotel. prontohotel.com born to serve you in each part of your travel.



Google Map
The great advantage of prontohotel.com is the google map and it's panoramio's picture. This maps will give you instraction to follow the right path in the city. By this site, you can able to choose from more than 200 hotels in the world. You can find here many feture hotels like amsterdam hotels, prague hotels. You can get enough information about this hotel like map, picture, news , hot tips etc.



Why you are waiting?
It's simple and interesting ! You will able to join their travellers community that will allow you to get in touch with your travel experience, to post picture, to post comment and to join in prontohotel.com's site! Beside this, what you are want ? Why you are waiting ? Fill up the city name, period of time, number of room and book your favaorate hotel. So, click on the search button and their search engine will find for you the best rates any hotel throughout the world. Never forget to come back for your future travel and discovery. Remember, prontohotel.com improves constantly and includes many information day by day.





Interface test automation with iTestBot
Are you finding software, which you can help for interface test automation? Then iTestBot is the perfect solution for you. iTestBot is designed for visual software interface testing . When you test with iTestBot then it return result of each test, process automatically error and warning messages, even close the test when it goes timeout or hang. iTestBot can make a software tester or quality assurance specialist’s life too easier and sweeter.



GUI test automation
gui test automation is not so easy task but the iTestBot is excellent for automated gui test. The iTestBot web site has a nice example for graphical user interface (GUI) automation test where they use iTestBot software. You can run the iTestBot in a batch for process a set of test. iTestBot can move mouse to absolute or relative coordinates.



Task automation
Have you any routine task that you need to repeat? iTestBot is not only for interface testing software but also can do some routine task for you .iTestBot task automation feature is more user friendly. iTestBot can help you by save your valuable time. For example, you need to make many screenshots regularly. iTestBot have script to help you to do this. In this time, you may pass with your friends. iTestBot can automatic click a button, pressing few keys, even filling some data on web sites or selecting item from a list. iTestBot have many built in commands to automation your routine task.



Cellit Mobile Marketing
IF you find mobile marketing solution for your business then Cellit is the right place for you. Cellit Mobile Marketing is one of the best company which provides many facilities like, complete mobile marketing solutions and contact with your client. Cellit uses text messaging, WAP or Voice as its three technology mediums. Its technology is being used in many large companies such as Philips,P&G, Sotheby's, Dell, HSBC,VeriSIgn, Krystal, RE/MAX Associates, Prudential, Marie Claire, Hearst Corporation and other companies.



Cellit Services
Cellit Mobile Marketing is a Chicago based mobile marketing company, that served mainly small business but it related in many large companies. Cellit have create two services, the CouponZap and House4Cell for it's smaller clients. Couponzap is the system for mobile campaigns for bars, restaurants and nightclubs.With CouponZap, small business owners can create mobile coupon campaigns by text message. House4Cell is the best solution to provide information and data on the property . House4Cell is promising and the insurgency's property. House4Cell which is a text info service for real estate professionals. House4Cell even got featured in the December 2006 issue of "Real Estate Trends + Technology".What House4Cell and CouponZap both provide is an easy to use web-based front-ends. They work with great company and they have great experience in this area of business.



Cellit Shortcodes
Cellit Shortcodes is an excellent offer for business owner. Cellit can set up your own 5-digit phone number. That you can use for text message promotions. For example American Idol, text vote to 55555. This is useful for text marketing, text-to-win, and text promotions.

Cellit other Services
Cellit Studio provides many mobile solutions. It provides powerful mobile marketing tools . Cellit takes low monthly fees to extend their client business. Business owner can create trackable mobile marketing campaigns like Text-For-Info ,Text-For-Content ,Contests and Games ,Text-To-Win , Text-To-Vote, CRM Programs ,Customized Appointment Reminders . Business owner can also measure the effectiveness of their traditional mobile advertising. Cellit offer real-time delivery of alerts and information, and now offers a nice solution for safety concerns. Cellit supports the real estate brokers and condominium developers for instant information on properties,direct to the buyer. Cellit also offers job Recruiting ,Surveys, coupon and Custom Solutions.



Starting a Business
If you already have a business or you want starting a business, Sta.rtUp.biz is the right place for you. The social networking site Sta.rtUp.biz has launched its service offering small business owners with a platform where they can socialize and network with fellow business practitioners. It is a place where you can get all necessary features like LinkedIn, MySpace, FaceBook, and CNNMoney. It is a great feature combination for a new business owner. The other social networking site is full of teens or spammers profile. So it is very difficult to find your business peers profile who can help you for starting or developing your business. Sta.rtUp.biz is an excellent place where all profiles are business related. The site is well designed for support an entrepreneurs. The site is full of resource and easy to use. This is the idle place for share others business experience and knowledge.



Free Search Engine Optimization
Everybody knows what the necessity of Search Engine Optimization is. It is not a subject for joke. For successful optimization business, site owners need to consult with experts. The Sta.rtUp.biz gives you the opportunity for Free Search Engine Optimization. This makes the Sta.rtUp.biz a unique social networking site for small business owners. Sta.rtUp.biz helps the members for improving their sites Google Rankings. Its offers all essential tips, techniques and advice for Search Engine Optimization. Sta.rtUp.biz supports the business owners by providing corporate lawyer who answer the business related legal questions. It's also has veteran serial entrepreneur who mentors business owners on all management and strategy. The forum has many good discussions for search engine optimization. For your own issue you can open a new discussion thread under appropriate category to get legal advice. It is also a free service.

Motivational Video Clips
Sta.rtUp.biz video section is excellent and resourceful. The Motivational Video Clips are very helpful for entrepreneurs. Here you can see the tips, techniques, problems, success story. It's have the power to motivate you to start a business. Sta.rtUp.biz also shows the headline from several top business magazines and journals like INC Magazine, Entrepreneur Magazine, BusinessWeek SmallBiz.



Site Specialty
Joining the Sta.rtUp.biz is easy, free and takes only half a minute. The site is simple, clean and well designed. Site navigation is very helpful. You can easily invite your friends from Yahoo Mail, Hotmail, GMail or AOL Mail.



Tickets Exchange on viagogo.co.uk

Do you need Madonna Ticket?
If you like, Madonna concert then you should go to the viagogo.co.uk site. Madonna tickets are availabe now. There have many concert tickets like Madonna's Cardiff concert. It has tickets for huge international events. It also has many UK events.



So why viagogo?
Viagogo is an online ticket exchange that allows people to buy and sell live event tickets in a safe and guaranteed way.The site is very helpful to find various events and buy tickets. User need to register here for sale or buy tickets. Registration is very easy and free. Tickets sellers pay 15 percent commission to viagogo while buyers pay only 10 percent.

This agency has the biggest selection of events and the best prices. If you want to sale your ticket then it is an best site. To buy an event ticket you only need to login for place your order. You can choose the delivery method out any hesitation. After buy you get a confirmation email that you done all formalities to receive your ticket.

The company matches buyers and sellers of concert tickets, sports tickets, theater tickets and more. Sellers can offer tickets via three options, i.e., fixed price, auction, and declining price

The site events are arranged in three main categories-Concert tickets, Sports Tickets, Arts and Theater Tickets. There have one special category named "Exclusive Tickets". Buyers are guaranteed tickets on time; if a problem arises, no fears, Viagogo will provide similar tickets or better ones at no extra cost.

Exclusive Tickets:
In this section you find the most exclusive tickets. Here also placed an event ticket hot list .So when you are busy, you need only few second to find most exclusive tickets.

Sports Tickets:
the sports tickets section have many subcategory like Football, Boxing, Rugby Union, Wrestling, Golf, Tennis, Cricket, Horse Racing, Motor sport, Basketball etc which is help you to find out your desired events.



Concert Tickets:
I this section all concert events are listed. There are several subcategory such as Rock and Pop, Alternative and Indie , Festivals , Clubs and Dance , Hard Rock/Metal , Country and Folk , World Music etc. Very recently i found Tina Turner Tickets, Nickelback Tickets, Coldplay Tickets are available.



Festival Tickets:
Here you can get many festival tickets such as Reading Festival tickets, O2 Wireless festival tickets, Leeds Festival Tickets. All transaction is supported by their customer service team, which can be contacted by phone and email any time any day.

Viagogo Hospitality
Viagogo's hospitality is very standard and qualitative. They understand their client’s needs, so they provide best solution for their clients. Very recently i found the site offers Madonna hospitality.



Customer Service:
The site’s help section is resourceful to find your answer. However you may email their for ask a question. You also buy your tickets over the phone. Just call UK: 0845 301 0032 or Outside the UK: +44 (0)1392 428 318

Viagogo Guarantee:
The site guarantee the buyer will receive the tickets as soon as possible and the seller will be paid after the tickets have been sold and delivered.It is hacker free and secured.

Site Specialty:
The site have several version on different languages such Deutsch, Español, Français, Nederlands, English (UK) . Site is hacker free certified by Mcafee , security certified by Verisign. They accept paypal.

The site is simple, clean and well designed. Site navigation is very helpful for find events; you may also search the specific events.



Coldfusion Tutorial : Hold Output

Description
A simple techniqe for hold coldfusion page output for a few time.

Example

holdoutput.cfm

<cfflush interval="1">

<cfset startTime=TimeFormat(Now(),"hh:mm:ss")>
<cfset stopTime=TimeFormat(DateAdd("s",30,startTime),"hh:mm:ss")>
<cfset endTime=TimeFormat(DateAdd("s",1,startTime),"hh:mm:ss")>

<cfoutput>Start Time : #startTime#</cfoutput><br/>
<hr/>
<cfloop condition=" startTime NEQ endTime">
 <cfset startTime=TimeFormat(Now(),"hh:mm:ss")>
 <cfif startTime EQ endTime>
  <cfoutput>Now Time : #endTime#</cfoutput><br/>
  <cfset endTime=TimeFormat(DateAdd("s",1,startTime),"hh:mm:ss")>
 </cfif>
 <cfif startTime GTE stopTime>
  <cfbreak>
 </cfif>
</cfloop>

   


Example Output



Coldfusion Tutorial: Color Picker

Description
A simple and full featured color picker. It is component based. Just create a picker.cfc file. That you can reuse. Finaly you can call this component from any where in your application.



Example

picker.cfc page

<cfcomponent>
 <cffunction name="ColorPicker" access="remote" returntype="string">
  <cfwindow name="ColorWindow" initshow="false" width="200" height="220">
   <script language="javascript">
    function thisElement(name){
     currentElement = name ;
    }
   </script>
   
   <script language="javascript">
    function selectedColor(colorValue){
     var currentColor = colorValue ;
     //document.getElementById(currentElement).value="#"+currentColor;
     document.getElementById(currentElement).style.backgroundColor="#"+currentColor;
    }
   </script>
  
   <cfset CharList="0,3,6,9,C,F">
   <cfset Counter=0>
   <cfoutput>
    <table border="0" cellspacing="1">
     <tr>
      <cfloop list="#CharList#" index="GreenColor">
       <cfloop list="#CharList#" index="BlueColor">
        <cfloop list="#CharList#" index="RedColor">
         <cfif Counter % 18 EQ 0>
          </tr><tr>
         </cfif>
         <td onmouseover="document.getElementById('codeDisplay').value ='###RedColor##RedColor##GreenColor##GreenColor##BlueColor##BlueColor#';"
          onclick="selectedColor('#RedColor##RedColor##GreenColor##GreenColor##BlueColor##BlueColor#');
             javascript:ColdFusion.Window.hide('ColorWindow');"
           title="#RedColor##RedColor##GreenColor##GreenColor##BlueColor##BlueColor#"
           style=" background-color: #RedColor##RedColor##GreenColor##GreenColor##BlueColor##BlueColor#; color: black; font-size:7px; width:7px; height: 7px; cursor:pointer">
          <a onmouseover="document.getElementById('colorDisplay').style.backgroundColor ='#RedColor##RedColor##GreenColor##GreenColor##BlueColor##BlueColor#';">   </a>
         </td>
         <cfset Counter=Counter+1>
        </cfloop>
       </cfloop>
      </cfloop>
     </tr>
     <tr>
      <td colspan="18" headers="5"></td>
     </tr>
     <tr >
      <td id="colorDisplay" colspan="9" height="15" bgcolor="" style="background-color: red;"></td>
      <td colspan="9" height="15" bgcolor=""><input type="text" value="" id="codeDisplay" style="height: 15px; width: 90px; border: none; font-size: 12px;" readonly="yes"></td>
     </tr>
    </table>
   </cfoutput>
  </cfwindow>
 </cffunction>
</cfcomponent>

   


picker.cfm this is caller page. Here you must pass the input box id to javascript.

<cfscript>
 objPicker=CreateObject("component","picker");
</cfscript>
<cfset objPicker.ColorPicker()>

<cfoutput>
<center>
<form name="oTableForm" action="" method="post">
 <table>

  <tr>
   <td colspan="2">Click the box</td>
  </tr>
  <tr>
   <td>Color 1:</td>
   <td>
    <input type="text" name="color1"   readonly="yes" value="" onfocus="javascript:ColdFusion.Window.show('ColorWindow'); thisElement('color1');" />
   </td>
  </tr>
  <tr>
   <td>Color: 2</td>
   <td><input type="text" name="color2"    readonly="yes" value="" onfocus="javascript:ColdFusion.Window.show('ColorWindow'); thisElement('color2');" /></td>
  </tr>
 </table>
</form>
</center>
</cfoutput>

   


Example Output



Coldfusion Tutorial: Slide Show

Description
Just create a file slideshow.cfm and a image folder.You must enable the session in application page.



Example

slideshow.cfm page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="refresh" content="5"/>
<title>Slide Show</title>
</head>

<body>

 <cfset templatePath=GetBaseTemplatePath()>
 <cfset rootFolder=ListDeleteAt(templatePath,ListLen(templatePath,"/\"),"/\")>
 <cfset imageFolderPath="#rootFolder#\images">
 
 <cfdirectory action="list" directory="#imageFolderPath#" name="ImageList">
 <cfif Not IsDefined("session.Counter") OR session.Counter GTE ImageList.RecordCount>
  <cfset session.Counter=0>
 </cfif>
 <cfset session.Counter=session.Counter+1>
 <cfoutput><img src="#imageFolderPath#\#ImageList.name[session.Counter]#"/></cfoutput>
 
</body>
</html>

   


Example Output

First create the application.cfm file in your root folder,then write this code.

Application.cfm
 <cfapplication name="cfcentral"
    sessionmanagement="true"
    sessiontimeout="#CreateTimeSpan(0,0,30,0)#"
    />
  <cfset application.dsname="suman">
  <cfset request.dsname="suman">
  <cfset session.profile=StructNew()>
 
 <cfif IsDefined("Form.logout")>
  <cflogout>
 </cfif>
 
 <cflogin>
  <cfif NOT IsDefined("cflogin")>
   <cfinclude template="loginform.cfm">
   <cfabort>
  <cfelse>
   <cfif cflogin.name IS "" OR cflogin.password IS "">
    <cfoutput>
  <h2>You must enter text in both the User Name and Password fields.     </h2>
    </cfoutput>
    <cfinclude template="loginform.cfm">
    <cfabort>
   <cfelse>
    <cfquery name="loginQuery" dataSource="#request.dsname#">
    SELECT AdminName, Role
    FROM admin
    WHERE
  AdminName = '#cflogin.name#'
  AND Password = '#cflogin.password#'
    </cfquery>
    <cfif loginQuery.Role NEQ "">
  <cfloginuser name="#cflogin.name#" Password = "#cflogin.password#"
   roles="#loginQuery.Role#">
    <cfelse>
  <cfoutput>
   <H2>Your login information is not valid.<br>
   Please Try again</H2>
  </cfoutput> 
  <cfinclude template="loginform.cfm">
  <cfabort>
    </cfif>
   </cfif> 
  </cfif>
 </cflogin>
 
 <cfif GetAuthUser() NEQ "">
  <cfoutput>
   <form action="#CGI.script_name#?#CGI.query_string#" method="Post">
    <input type="submit" Name="Logout" value="Logout">
   </form>
  </cfoutput>
 </cfif>
   
Second create loginform.cfm file in your root folder.

loginform.cfm
 Please Log In
 
 <cfoutput>
    <form name="LoginForm" action="#CGI.script_name#?#CGI.query_string#" method="Post">
    <table>
    <tr>
    <td>username:</td>
    <td><input type="text" name="j_userName"></td>
    </tr>
    <tr>
    <td>password:</td>
    <td><input type="password" name="j_password"></td>
    </tr>
    </table>
    <br>
    <input type="submit" value="Log In">
    </form>
 </cfoutput>
   
Craete a table name admin with AdminName,Password,Role field.

WOW its done 

hi,
here i introduce pagination technique.this very simple and esay.
this examples first part i only shows how you can make a data show page
with pagination.lets done...

create a page with name pagination.cfm,here the code bellow

pagination.cfm
 <cfparam name="request.dsname" default="suman">
 <cfparam name="TableName" default="admin">
 <cfparam name="MaxRow" default="5">
 <cfparam name="url.PageNumber" default="1">
 
 <cfif NOT IsDefined("session.qSelectQuery") OR IsDefined("url.CreateNewSession")>
  <cfquery name="session.qSelectQuery" datasource="#request.dsname#">
   SELECT *
   FROM #TableName#
  </cfquery>
 </cfif>
 
 <cftable query="session.qSelectQuery" startrow="#((url.PageNumber*MaxRow)-MaxRow)+1#" maxrows="#MaxRow#" colheaders="yes">
  <cfloop list="#session.qSelectQuery.ColumnList#" index="Column">
    <cfcol text="#Evaluate(Column)#" header="#Column#">
  </cfloop>
 </cftable>
 
 <cfoutput>
  <cfloop from="1" to="#Ceiling(session.qSelectQuery.RecordCount/MaxRow)#" index="i">
    <a href="#CGI.SCRIPT_NAME#?PageNumber=#i#">#i#</a>
  </cfloop>
  .........page #url.PageNumber# of #Ceiling(session.qSelectQuery.RecordCount/MaxRow)#......
  <a href="#CGI.SCRIPT_NAME#?CreateNewSession">run the select query again</a>
 </cfoutput>
   
change the parameter as you need.then check with browser.
what you see...yes its done.

for reusable pagination technique read the second part.

hi,
this is second part of pagination example.here i show pagination technique
that is reusable.at first i create a function for pagination then call it when need.
lets do the job.

create a page name pagination.cfm,code bellow.

pagination.cfm
 <cfoutput>#Pagination("Suman","admin")#</cfoutput>
 
 <cffunction name="Pagination" access="remote" returntype="any" output="yes">
  <cfargument name="dsname" required="yes">
  <cfargument name="TableName" required="yes">
  <cfargument name="MaxRow" default="10" required="no">
  
  <cfparam name="url.PageNumber" default="1">
  
  <cfif NOT IsDefined("session.qSelectQuery") OR IsDefined("url.CreateNewSession")>
   <cfquery name="session.qSelectQuery" datasource="#dsname#">
    SELECT *
    FROM #TableName#
   </cfquery>
  </cfif>
  
  <cftable query="session.qSelectQuery" startrow="#((url.PageNumber*MaxRow)-MaxRow)+1#" maxrows="#MaxRow#" colheaders="yes">
   <cfloop list="#session.qSelectQuery.ColumnList#" index="Column">
  <cfcol text="#Evaluate(Column)#" header="#Column#">
   </cfloop>
  </cftable>
  
  <cfoutput>
   <cfloop from="1" to="#Ceiling(session.qSelectQuery.RecordCount/MaxRow)#" index="i">
  <a href="#CGI.SCRIPT_NAME#?PageNumber=#i#">#i#</a>
   </cfloop>
   .........page #url.PageNumber# of #Ceiling(session.qSelectQuery.RecordCount/MaxRow)#......
   <a href="#CGI.SCRIPT_NAME#?CreateNewSession">run the select query again</a>
  </cfoutput>
 </cffunction>
   
the pagination function is done.you can use it in your page more than one
time without write huge code....

hi,
this is the final part of pagination example.here i use object oriented coldfusion.
this create a pagination object which you can call anywhere in your application.

here you need to create to file named pagination.cfc and pagination.cfm
for simpler issue you should place the both file in a common folder.
the code goes bellow.

pagination.cfc
 <cfcomponent author="cfsuman@gmail.com">
  <cffunction name="Pagination" access="remote" returntype="any" output="yes">
   <cfargument name="dsname" required="yes">
   <cfargument name="TableName" required="yes">
   <cfargument name="MaxRow" default="10" required="no">
   
   <cfparam name="url.PageNumber" default="1">
   
   <cfif NOT IsDefined("session.qSelectQuery") OR IsDefined("url.CreateNewSession")>
    <cfquery name="session.qSelectQuery" datasource="#dsname#">
  SELECT *
  FROM #TableName#
    </cfquery>
   </cfif>
   
   <cftable query="session.qSelectQuery" startrow="#((url.PageNumber*MaxRow)-MaxRow)+1#" maxrows="#MaxRow#" colheaders="yes">
    <cfloop list="#session.qSelectQuery.ColumnList#" index="Column">
   <cfcol text="#Evaluate(Column)#" header="#Column#">
    </cfloop>
   </cftable>
   
   <cfoutput>
    <cfloop from="1" to="#Ceiling(session.qSelectQuery.RecordCount/MaxRow)#" index="i">
   <a href="#CGI.SCRIPT_NAME#?PageNumber=#i#">#i#</a>
    </cfloop>
    .........page #url.PageNumber# of #Ceiling(session.qSelectQuery.RecordCount/MaxRow)#......
    <a href="#CGI.SCRIPT_NAME#?CreateNewSession">run the select query again</a>
   </cfoutput>
  </cffunction>
 </cfcomponent>
   
pagination.cfm
 <cfscript>
  PaginationObject=Createobject("Component","pagination");
 </cfscript>
 
 <cfset PaginationObject.Pagination("suman","admin")>
   
hei now run the pagination.cfm file in your browser.
whats hapend?yes this call object oriented web programming.


Note: very recent i found little bug in this tutorial.
Soon i will fix it.
If you want then you may fix it.
This a challange for you...


hi,
here i show a object oriented technique for documented your code.
when you build your site then you may want a pdf file here you can get all of your code.for this purpose you can try it.

for this create two file in your application root folder named codedocumentation.cfc and codedocumentation.cfm,here the both file code.

codedocumentation.cfc
 <cfcomponent hint="Create Code Documentation" output="yes">
 
  <cffunction name="GetApplicationMap" access="remote" returntype="array">
 
   <cfargument name="SiteRootDirectory" type="string" required="yes">  
   <cfargument name="OutputFileFormat" type="string" required="yes">    
  
   <cfset FolderExploreStatus=0>
 
   <!--- Create a Array for hold all  Files List--->  
   <cfset FileArray=Arraynew(2)>
 
   <!---Root Directory's Contents--->
   <cfdirectory action="list"
    directory="#arguments.SiteRootDirectory#"
    name="ParentDirectory"
    >
 
   <!---Root Directory's Directory--->
   <cfquery name="DirectoryList" dbtype="query">
    SELECT *
    FROM ParentDirectory
    WHERE TYPE='Dir'
   </cfquery>
   
   <!---List of all Folder Path--->
   <cfset FolderPathArray=Arraynew(1)>
   <cfset TempFolderPathArray=ArrayAppend(FolderPathArray,arguments.SiteRootDirectory)>
   <!---<cfdump var="#FolderPathArray#"><br/>--->
   
 
   <!--- Create a Array for hold  Folder List--->  
   <cfset FolderArray=ArrayNew(2)>
 
   <cfset FolderCounter=1>
   <cfloop query="DirectoryList">
    <cfset FolderArray[FolderCounter][1]=DIRECTORY>
    <cfset FolderArray[FolderCounter][2]=NAME>
    
    <cfset FolderPath="#DIRECTORY#\#NAME#\">
    <!---<cfdump var="#FolderPath#"><br/>--->
    <cfset TempFolderPathArray=ArrayAppend(FolderPathArray,FolderPath)>
    <cfset FolderCounter=FolderCounter+1>
   </cfloop>
 
   <cfset FolderNumber=ArrayLen(FolderArray)>
  
   <cfif FolderNumber GT 0>
    <cfloop condition=" FolderExploreStatus EQ 0 ">
  <cfset CurrentFolderDirectory=FolderArray[1][1]>
  <cfset CurrentFolderName=FolderArray[1][2]>
  
  <cfset CurrentFolderPath="#CurrentFolderDirectory#\#CurrentFolderName#\">
  
  <!--- List the Current directory's Directory--->  
  <cfdirectory
   action="list"
   name="ChildDirectory"
   directory="#CurrentFolderPath#"
   > 
 
  <!--- List the Current directory's Directory--->  
  <cfquery name="ChildDirectoryList" dbtype="query">    
   SELECT *
   FROM ChildDirectory
   WHERE TYPE='Dir'
  </cfquery>
    
  <cfset TempFolderArrayDelete=ArrayDeleteAt(FolderArray,1)>
    
  <cfset FolderCounter=ArrayLen(FolderArray)>
  <cfset FolderCounter=FolderCounter+1>
   
  <cfloop query="ChildDirectoryList">
   <cfset FolderArray[FolderCounter][1]=DIRECTORY>
   <cfset FolderArray[FolderCounter][2]=NAME>  
   
   <cfset FolderPath="#DIRECTORY#\#NAME#\">
   <!---<cfdump var="#FolderPath#"><br/>--->
   <cfset TempFolderPathArray=ArrayAppend(FolderPathArray,FolderPath)>
   <cfset FolderCounter=FolderCounter+1>
  </cfloop>
 
  <cfset FolderNumber=ArrayLen(FolderArray)>
  <cfif FolderNumber LT 1>
   <cfset FolderExploreStatus=1>
  </cfif>
  
    </cfloop>
   </cfif>
   
   <!---Now we find final folder path array--->
   
   <cfset TotalFolder=ArrayLen(FolderPathArray)>
   
   <cfloop from="1" to="#TotalFolder#" index="index">
   
    <!---<cfoutput>#FolderPathArray[index]#</cfoutput><br/>--->
    <!---Root Directory's .cfm FileList--->
    <cfdirectory action="list"
   filter="*.cfm"
  directory="#FolderPathArray[index]#"
  name="CFMFileList"
  >
  
    <!---Root Directory's .cfml FileList--->
    <cfdirectory action="list"
   filter="*.cfml"
  directory="#FolderPathArray[index]#"
  name="CFMLFileList"
  >
  
    <!---Root Directory's .cfc FileList--->
    <cfdirectory action="list"
   filter="*.cfc"
  directory="#FolderPathArray[index]#"
  name="CFCFileList"
  >
  
    <!---Root Directory's .htm FileList--->
    <cfdirectory action="list"
   filter="*.htm"
  directory="#FolderPathArray[index]#"
  name="HTMFileList"
  >
  
    <!---Root Directory's .html FileList--->
    <cfdirectory action="list"
   filter="*.html"
  directory="#FolderPathArray[index]#"
  name="HTMLFileList"
  >
  
    <!---Root Directory's .css FileList--->
    <cfdirectory action="list"
   filter="*.css"
  directory="#FolderPathArray[index]#"
  name="CSSFileList"
  >
  
    <!---Root Directory's .js FileList--->   
    <cfdirectory action="list"
   filter="*.js"
  directory="#FolderPathArray[index]#"
  name="JSFileList"
  >
  
    <!---Root Directory's All FileList--->  
    <cfquery name="FileList" dbtype="query">
  SELECT *
  FROM CFMFileList
  UNION
  
  SELECT *
  FROM CFMLFileList
  UNION
  
  SELECT *
  FROM CFCFileList
  UNION
  
  SELECT *
  FROM HTMFileList
  UNION
  
  SELECT *
  FROM HTMLFileList
  UNION
  
  SELECT *
  FROM CSSFileList
  UNION
  
  SELECT *
  FROM JSFileList
    </cfquery>
  
    <cfset FileCounter=ArrayLen(FileArray)>
    <cfif FileCounter EQ 0>
  <cfset FileCounter=1>
    </cfif>
    <cfloop query="FileList">
   <cfset FileArray[FileCounter][1]=NAME>
   <cfset FilePath="#DIRECTORY#\#NAME#">
   <cfset FileArray[FileCounter][2]=FilePath>
   
  <cfset FileCounter=FileCounter+1>
    </cfloop>
   
   </cfloop>
   
   <!---Now we find final file array--->
   <cfdump var="#FileArray#">
   
   <cfset TotalFile=ArrayLen(FileArray)>
   
   <cfif TotalFile GT 0>
    <cfdocument format="#arguments.OutputFileFormat#">
  <cfdocumentsection>
   <cfdocumentitem type="footer">
    <font size="-3">Page #cfdocument.currentpagenumber#</font>
   </cfdocumentitem>
     
   <cfloop from="1" to="#TotalFile#" index="position">
 
    <cfdocumentitem type="header">
     <cfoutput>
   <font size="-3">
    <i>
     Code Documentation
    </i>
   </font>
     </cfoutput>
    </cfdocumentitem>
 
    <cffile
     action="read"
     file="#FileArray[position][2]#"
     variable="FileCode"
     >
    <cfoutput>
     <h3>
   <i>
    #FileArray[position][2]#
   </i>
     </h3>
     <br/>
 
     <h2>
   #FileArray[position][1]#
     </h2>
    </cfoutput>
    <br/>
    
    <cfoutput>
     #HTMLCodeFormat(wrap(FileCode,75))#
    </cfoutput>
   </cfloop>
    </cfdocumentsection>
    </cfdocument> 
   </cfif>
 
   <cfreturn FolderPathArray>
  </cffunction>
 </cfcomponent>
   
codedocumentation.cfm
 <cfset ApplicationRootpath=ExpandPath(".")>
 
 <cfif IsDefined("Form.GetMap")>
  <cfscript>
   ApplicationMapObject=CreateObject("Component","codedocumentation");
  </cfscript>
  <cfset ApplicationMapObject.GetApplicationMap(Form.ApplicationRootpath,Form.FileFormat)>
 </cfif>
 
 <div align="center">
  <cfform name="FileFormatForm" action="#CGI.SCRIPT_NAME#" method="post" target="_blank">
   <cfselect name="FileFormat" label="Output Format">
    <option value="pdf">PDF</option>
    <option value="flashpaper">Flash Paper</option>
   </cfselect>
   <cfinput type="hidden" name="ApplicationRootpath" value="#ApplicationRootpath#">
   <cfinput type="submit" name="GetMap" value="Get Application Map">
  </cfform>
 
 
 </div>
   
hei..
now run the codedocumentation.cfm file in your browser.
submit the form.
what you see...?
yes its object oriented web programming.

Copy the below code and paste your editor.Before it you
need two table one tblCountry  with CountryID,CountryName
Column And another tblCounty with CountyID,CountryID,
CountyName Column.Edit code if needed.

<cfquery name="qCountry" datasource="#DataSourceName#">
SELECT * FROM tblCountry
</cfquery>


<cfquery name="qCounty" datasource="#DataSourceName#">
SELECT     CountyID, CountryID,CountyName
FROM         tblCounty
</cfquery>


<cfsavecontent variable="CountyList">

var CountyName = [];

var SelectedCountry=Country.selectedItem.data;


<cfoutput query="qCounty">

var CountryID=#CountryID#;

if (CountryID == SelectedCountry)

{

var AddCounty = {label:'#CountyName#', data:#CountyID#};

CountyName.push(AddCounty);

}

</cfoutput>



County.dataProvider = CountyName;

</cfsavecontent>


<div align="center">
<cfform format="flash" width="300" height="200">

<cfformgroup type="panel" label="Select Country and County">

<cfselect label="Country" name="Country" query="qCountry" value="CountryID" display="CountryName" required="yes" onchange="#CountyList#">

</cfselect>

<cfselect name="County" label="County">

Select

</cfselect>

</cfformgroup>

</cfform>
</div>


Disclaimer|Rss Directory|Try a Feed|Suggest a Feed|F-A-Q|Partners
Links: Référencement internet |