I have a way for people to search for database records. I want to find plurals and singular so I want to strip the 's' off their keyword. So far I have
<!--- trim off the s if its plural --->
<cfif #right(Attributes.Keywords,1)# IS "s">
cfset the Attributes.Keywords to be trimmed 1 char from...
I'm trying to store foreign characters in mySQL 4.1 and ColdFusion.
Until recently I used Access. The user entered "ö" into a form and "ö" got stored in the database.
Now I'm trying to move to mySQL 4.1. The user enters say "Malmö" in a form field and "Malm" gets stored in mySQL (in other...
I'm using the following code to insert into an Access db...
<cfquery datasource="dsn" name="subscribe">
INSERT INTO email_addresses
(listID,
emailaddress)
VALUES
('1',
'#Form.emailaddress#')
</cfquery>
But I get the error...
"Error casting an object of type to an incompatible type. This...
I'm a real MySQL newbie but I think I have MySQL5 installed and a db created on localhost:3306 (SQL Manager 2005 Lite tells me this is OK)
In the CF administrator I type the datasource name. When I select a driver from the drop down there is no MySQL 5 so I select MySQL3.x (is this a problem?)...
Hi
I'm using
<img src="#ImageSRC#" alt="#ImageName#" />
to show an image and alt tag. The problem is that the ImageName sometimes contains a " (to mean inches) and this causes the tag to close early when rendered eg
<img src="ruler.gif" alt="12" ruler" />
Is there a way to force the...
Hi
I have a word document where all the text is inside hundreds of frames (its been exported from pdf). How can I globally remove all the frames and leave it as 'inline' text? (I need to keep images and formatting)
--
John
My customer uploads files into folders they create. I need to display those folders and files. I'd expect this to reletively common and easy requirement but I'm stuck. Should I look at cfdirectory to get the information? CFtree to display (I'm not keen that its java)? Some Flex solution? Or is...
I'm using <cfset weeknumber = #week(NOW())#> to get the week number. It tells me that it is week 41. However this site http://www.onlineconversion.com/day_week_number.htm tells me that it is actually week 40. Why the discrepancy?
(My system date is set to 6/10/2006 (uk format))
--
John
I want to show an event only if it's in the future, so I used...
<cfif #Dateformat(NOW(),"dd mm yyyy")# LTE "10 02 2006">
This is an event that occurs on 2nd Oct 2006
</cfif>
However I also only want to only show it, if it's less than (say) 60 days in the future - how would I evaluate the date...
I've got a series of variables from a database consisting of some words...
"one two three"
"four five"
"six seven eight nine"
...in each case I need to trim the variable to show just the first word...
"one"
"four"
"six"
...is this possible please?
--
John
Hi
I have a cf template to update all the pages in my site.
I enter the following code in the template (i've tried with the cfoutput in 3 different places to try and investigate the problem)
**********************************************
<cfoutput>#range#</cfoutput>
<div class="col3"...
I need to use variables inside a CSS file. How can I make ColdFusion parse the .css file. Alternativly, is there a way I can rename the .css to .cfm?
--
John
I'm referencing a file - e.g. a style like...
@import url("/myfolder/myfile.css");
This works fine when on the live server - it finds the file at http://mydomain/myfolder/myfile.css
However when I work locally I user
http://localhost/client1
http://localhost/client2
etc
So the above...
I send emails to about 300 members of an association that have opted in. The wording in the messages seems benign (no mention of "free" or "viagra"!). However the emails are marked as spam by some/many(?) members. What can I do to reduce the liklihood of the message being identified as spam?
--...
Dreamweaver seems to be playing up lately! When I try to edit a page that has a template applied I can make the edit but I get the message...
"You have made changes to code that is not marked as editable. If you retain those changes, they will be lost the next time you apply a template update...
I want my product_name to be displayed with a following hyphen. I thought the following code would work, but it causes an error. Any advise on how to do this?
#concat(product_Name, "-")#
--
John
We're told to make use of H1 tags. However a need to use a specific font and hence need to use an image (I realise text would be better). Does surrounding the img tag in H1 provide any benefit? And would I gain advantage from using the title tag?
ie
<h1><img src="image.gif" alt="Some...
I'm getting email injection attacks on a CF server. (for background see http://mkruger.cfwebtools.com/index.cfm?mode=alias&alias=email%20injection)
I want to abort the form processing if there's no form.email variable - or if it contains carraige returns. Does this code look right?
<cfif NOT...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.