Discount Web Design Blog

Just another Web Design Blog

Entries for the ‘ColdFusion’ Category

re-sequence row number

I have a query that returns hundres of records and a field called [query].currentrow. This works great as it displays the row number for the entire recordset from 1 to xxx.

However, my customer would like this number to reset when a specific field changes. How does one do that? I am putting [...]

query display performance

I have a query brings back thouands of records. In order not to impact performance of display and paging, what would be the best way to do it without using query caching? Is it possible to keep the recordset first time query it and using it while paging?

Thanks.

Greek language

I’m working on a website for a electronics website. They want to have the description for the products in two languages (English and Greek). Basic text on the pages works fine since I have <cfprocessingdirective pageEncoding="utf-8"> on the page but the content coming from the database gives all kind of strange characters. What should I [...]

paypal integration

Is there some kind of custom tag for paypal integration. I mean normally you need create a button on the paypal site. Is there some way to integrated it in your own site

Calendar gives error only for month of February??

Here is the cf code causing the problem in the error msg:

Code:
<cfif IsDefined("url.month")>
<cfset tNow = CreateDateTime(#url.year#, #url.month#, #day(now())#, 00,00,00)>
<cfelseif IsDefined("form.month")>
<cfset tNow = CreateDateTime(#form.year#, #form.month#, #day(now())#, 00,00,00)>
<cfelse>
<cfset tNow = Now()>
</cfif>

Here is the error msg I get on my calendar page when I choose the month of [...]

Dependent Drop Down Lists

Hi all. I have three tables (categories, Subcategories and Products) On the front end I have a query that generates the category/subcategory menu items depending on what products are in the database ant it works fine (It only shows categories and subcategories if there are products in the database with those cat_id and subcat_id). This [...]

Preventing CFMail from being send twice

I have a simple shopping cart (Arrays and Structures). When someone have checked out the come on a age with their order information and a cfmail is send with that order information. I just found out that when I refresh the page the cfmail is send again (this time without order details since I also [...]

Replacing strange characters

Wen I use copy and paste to add certain text to the database I get some strange characters like  and . Is there an easy way to get undo that?
Thank you in advance

Dunamic CF Form Calculations

I came across the code below on this site which is working fine, but when I use decimal points, the calculations are wrong.
Exp: if Field-1=10 and Field-2=5 , then Field-3=15 – good so far.
but when I change 10 to 10.5, I still get 15 rather than 15.5
Here is the code

Code:
<script language="JavaScript">
var one=0;
var two=0;
var three=0;
var [...]

CFoutput and jQuery

I have a jQuery Image rotator in where I want to output certain data (photo and text). This would normally not be so difficult was it not for the initial set up of the rotator. Here is the query and the rotator structure so you can see my problem:
Query

Code:
<cfquery name="getRotatoroutput" datasource="#Request.dsn#">
SELECT DISTINCT cat_id, cat_name, cat_image
[...]