coldfusion-8

how to get value of cf in javascript

Hi I have the following code in cf and I want to alert out the values ...... ...... <cfelse> <cfset val = structFind(request.session.prefs, key)> <cfquery name="insertPref" datasource="database"> INSERT INTO `database`.`user` ( `cID`, `cl...

What security scripts/code do you add to your application.cfm?

I am working on redoing our company's code, and I want to have a clear, easy to read, and reasonably secure application.cfm. And no, we are not using application.cfc. So let's not discuss that please. Just want to know what scripts you would add for security. I am using coldfusion 8 standard, sql 2008. Here is one of the scripts I am...

Convert Coldfusion Error.DateTime to a normal format?

At my company we store the information gathered from our site wide error template, into the database, but because of the format of the error.datetime it is making hard for me to do any sql queries for different date ranges. Has anyone used some t-sql or coldfusion code to convert it to a mm/dd/yyyy format? Here is an example of the fo...

ColdFusion 7/8 Varied Timezones

This problem makes me really sad. I'm working with a pretty archaic web application with an eclectic mix of programming languages. Previously, it stored any and all datetimes in a Datetime field in our MySQL database. Until now, everything has been done in server time, which happens to be US/Pacific. I was tasked with adding "Timezone fu...

How do I pass an onclick argument to a CFC to update the database through AJAX?

New to Ajax. Just trying to do a simple ajax/cfc vote yes/no app. Can’t get it to work What I am trying to accomplish is a simple Vote “Yes or No “ app where it shows the number of votes casted on each link (great idea 882    this sucks 163). After the visitor votes it displays the message (“you voted Yes 883” or “you voted No 164”) ...

cfajaxproxy / cfc Help Please

Now I have everything working but it's not updating the database. Tried changing the code in the cfc page but that just brings up errors when I refresh the page to test it. So I do know it calling up the cfc page, but when i click the link, everything work but updating the database. What did i do wrong?? Below is the code I came up wit...

Need to turn javascript (ajax) vote script into reusable (dynamic) script so it can be used over and over.

Need to turn javascript (ajax) vote script into reusable (dynamic) script so it can be used over and over. I have some ajax that works great, but I have to reproduce it and add unique identifiers [where you see 9 in the code are the unique identifiers that I have to change] for every question added that needs a vote. Need to make it dyn...

Coldfusion Web Service - Connection refused

Hello, I am receiving following error while connecting to coldfusion web service from client machine org.apache.commons.httpclient.HttpException : Connection refused: connect ( actual link to cfc component ) any idea? ...

How to pass an onclick link value to javascript and cfc though cfajaxproxy?

How do I pass an onclick value <CFOUTPUT QUERY="questions"><A HREF="javascript;()" onClick="VoteNo('#ID#');" ID="VotedNo">I Vote No</A></CFOUTPUT> in to javascript so that the script can be used multiple times for different questions? I am also using cfajaxproxy with the javascript so that ID value also needs to be passed on to the CFC s...

Remove repetition in <select><cfoutput><option>

I have an drop down in an Update form ‘id=”tak_id”’ being populated from an query”takType”. The drop down box has three options “sms, chat, tweet” with three different values”001,002,003”. The SELECTED value in the field is being repeated twice.How can I make the SELECTED value appear only once? The code is below <cfselect name="t...

ColdFusion - Creating column names dynamically with CFLOOP

I have a table that records the name of uploaded documents, up to 14 per record. The columns are named thus: TABLE tblDocuments COLUMNS documentID (int, not null, pk) document1 (varchar(250), null) document2 (varchar(250), null) /* and this continues through */ document14 (varchar(250), null) So I que...

timestamp case sensetive

Is the function Now() in ColdFusion case sensitive? Can I use now() instead of Now()? ...

Simple form with cfajaxproxy not working

Form is not working, does not post to the database though the CFC or seem to be working with the script. When you click on the PostComment button nothing happens. I just spent a day and tried many, many different things. Different buttons and different code, some made things worse and most just cased errors or refreshed the page. I’m not...

Pass form value into global var

Trying to pass a form value into a global var to be use in two functions but get this error document.PostReply is undefined or the javascript just crashes because getReplyId is undefined within the functions. No matter what I have tried I get one or the other errors Can anyone see why the form value "ReplyID" is not being passed into th...