Text shadow

In this morning, I'm thinking of how to decorate template design to look nice and how to upgrade. At that time, I found w3.org saying : we can make nicer text message with shadow without using image files. It's really great. Unfortunately, it works in only firefox, not support IE 7+.

http://www.w3.org/Style/Examples/007/text-shadow

Crop image proportionally with PHP

First of all, I'm not PHP geek. But, PHP is my second expert language after CF. I've created some freelance projects with PHP . You can hire me if you have some freelance projects for low cost and full reliable.

When I surf website for cropping image, I found this site. It's cool. Check it out.

http://deepliquid.com/projects/Jcrop/demos/crop.php

cfautosuggest is cool

I was crazy over GMail when I saw auto suggest function. That's why I've used that features most of my projects, referring from http://script.aculo.us. If I use javascript coding from it, we need to do some changes for our projects.If you're not well-expert in javascript, you can't do anything for it. Upset..?? Don't worry. You can use cfautosuggest. VoliĆ ..!!

view plain print about
1<cfform action="autosuggest.cfm" method="post">
2Name:
3<cfinput type="text" name="contactname" size="50" autosuggest="cfc:autosuggest.findContact({cfautosuggestvalue})" autosuggestminlength="1" maxresultsdisplayed="10" />
4</cfform>
autosuggest.cfc
view plain print about
1<cfcomponent output="false">
2
3<!--- Lookup used for auto suggest --->
4<cffunction name="findContact" access="remote" returntype="string">
5<cfargument name="search" type="any" required="false" default="">
6
7<!--- Define variables --->
8<cfset var local = {} />
9
10<!--- Query Location Table --->
11<cfquery name="QryAutoSuggestSimple" datasource="cfexample" >
12    select contactname from contacts
13    where contactname like
14    <cfqueryparam cfsqltype="cf_sql_varchar" value="#ucase(arguments.search)#%" />
15    order by contactname
16</cfquery>
17
18<!--- And return it as a List --->
19<cfreturn valueList(QryAutoSuggestSimple.contactname)>
20</cffunction>
21
22</cfcomponent>

CFQUERYPARAM and Oracle Databases

I've already shown in my old posts about the benefit of using cfqueryparam tag. Using this tag can prevent SQL inject and output data format what SQL like.

Generally, we use old-fashioned style like

view plain print about
1<CFQUERY DATASOURCE="DSN_NAME">
2SELECT username
3FROM users
4WHERE user_id = #SESSION.USER_ID#
5</CFQUERY>
In modern style, we use cfqueryparam tag within cfquery tag like

 

view plain print about
1<CFQUERY DATASOURCE="DSN_NAME">
2    SELECT username
3    FROM users
4    WHERE
5    user_id = <cfqueryparam value="#SESSION.USER_ID#" cfsqltype="cf_sql_number">
6</CFQUERY>

 

It's ok for passing variable is integer. If we want to pass string variable, we need to do following code. Unlike old-fashioned style, we don't need to put single quote in front of and end of cfqueryparam tag.

 

view plain print about
1<CFQUERY DATASOURCE="DSN_NAME">
2    SELECT username
3    FROM users
4    WHERE
5    user_name = <cfqueryparam value="#SESSION.USER_NAME#" cfsqltype="cf_sql_varchar">
6</CFQUERY>

 

Buch..!! How about Like condition..?? Don't worry. You can use as follow:

view plain print about
1<CFQUERY DATASOURCE="DSN_NAME">
2    SELECT username
3    FROM users
4    WHERE user_name=<cfqueryparam value="%#SESSION.USER_NAME#%" cfsqltype="cf_sql_varchar">
5</CFQUERY>

Cftooltip example

I used so many Ajax, javascripts and CSS for doing tooltip when I didn't know about cftooltip. If cftooltip feature is on CFMX8, we can save our time for doing tooltip. Using cftooltip is kinda simple :

view plain print about
1<cftooltip sourceForTooltip="mybio.cfm">PPSHEIN</cftooltip>

Write text vertically with CSS

Write text vertically with CSS is kinda simple. But, it works only in IE.

view plain print about
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
3<html>
4<head>
5<title>Write Text Vertically</title>
6</head>
7
8<body>
9
10
11<style>
12
13.verticaltext {
14writing-mode: tb-rl;
15filter: flipv fliph;
16font-family: tahoma, verdana;
17background:#f0f0f0;
18padding:5px;
19width: 30px;
20}
21
22</style>
23
24<div>Test-1</div>
25
26
27</body>
28</html>

Subreport with CFReport

There are two ways to create subreport in cfreport. One is to create with CFML file and the rest one is to create in cfr file. I'll describe which way is suitable and reduce risk of binding data. Building subreport in CFML file is pretty messy and kinda complicated to send subreportparam from main report. When I started creating like, all data from subreport can't be filtered by subreportparam from main report. Once I chose second one, everything's going alright.

Adobe Spray

In these days, I'm surfing adobe CF related blogs and seeking about advance technology for my future. Once I've reach www.johncblandii.com website, he explorer about adobe spray framework which just like jQuery. That's why I'm finding and reading articles for it.

Finally, I found it.

http://labs.adobe.com/technologies/spry/home.html

raphael js

I was speechless after surfing this website. All of his projects make me awe. We can refer or modify more useful projects by the way of learning his javascript projects.

Cheers,

http://raphaeljs.com/

 

Cfwindow

I've read some good information from www.coldfusionjedi.com. I found that's just like jQuery Dialog box. It has a lot of built-in functions like draggable, resizeable and so on. I'm now testing on it. That's why I don't have much of explanation about cfwindow. Check it out for example from

 

http://www.coldfusionjedi.com/index.cfm/2007/6/20/ColdFusion-8-AJAX-UI-Windows

Top of Page