cfchart question
Hi, I have a question regarding charting. Environment CF8.x developer latest patch, on Windows. I have the following chart: cfchart format=flash chartHeight=350 chartWidth=500 gridlines=5 dataBackgroundColor=##cc showBorder=no backgroundColor=##cc scaleFrom=0 showLegend=no seriesPlacement=cluster show3D=yestipStyle=MouseOver tipBGColor=##ff cfchartseries type=bar seriesLabel=item1 cfchartdata item=col_1 value=120/ /cfchartseries cfchartseries type=bar seriesLabel=item2 cfchartdata item=col_1 value=300/ /cfchartseries cfchartseries type=bar seriesLabel=Item3 cfchartdata item=col_1 value=50 / /cfchartseries cfchartseries type=bar seriesLabel=Item4 cfchartdata item=col_2 value=20 / /cfchartseries /cfchart I thought that the above will create a chart with two groupings, the first one 3 bars under col_1 xAxis label and one under col_2 xAxis label which is what I want. I need like this: 120/300/5020 col_1 col_2 What I get is duplication. All chartdata is shown for both col_1 and col_2 labels. And I get like this 120/300/50/20120/300/50/20 col_1col_2 I am missing something? Thanks Victor ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324020 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: webservice
When you hook up a web service in CF Admin how do you access it in your CFM pages? you can do it without defining it, and CF will do that part automagically for you here is some code calling one of our products web services.. I did a createobject cause I have lots of functions to process.. code cfset this.server=sharepoint cfset this.wsdl_path=/UDSM_R11_webservice/wsdl/webserviceapi.wsdl .. .. wsparm = StructNew(); wsparm[refreshWSDL]=no; wsparm[saveJava]=no; wsparm[wsdl2javaArgs]=-p com.ca.dsm.webservice; wsparm[port]=DSMWebServiceAPIService; if(arguments.server eq ) arguments.server=this.server; this.ws=CreateObject(webservice,http://; arguments.server this.wsdl_path,wsparm); this.server=arguments.server; /code and then when I invoke the methods on the object code cfset this.session = this.ws.Login(arguments.user,arguments.password,arguments.domain) /code Sam ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324021 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CFInvoke question
The server I'm working on has the 'CreateObject' function disabled. I was told to use cfinvoke instead. What would the following code look like, then, if wrapped in a cfinvoke statement?: cfscript imgObj=CreateObject(component, tmt_img); imgObj.resize(#cffile.serverFile#, #form.id#.jpg, 250); /cfscript Many thanks, Les ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324022 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
ODBC Date help
Hi All, My ODBC dates are being siaplyed as: {ts '2009-06-27 00:00:00'} How can I display just as 2009-06-27? -Jason ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324023 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: ODBC Date help
Doh! This: #DateFormat(eventqry.eventdate, mm/dd/)# ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324024 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFInvoke question
This should work for you. Just replace cfargument name in component with the correct argument name and you should be all set. The cfinvokeargument is passing in the arguments for the cffunction of resize. cfinvoke component=tmt_img method=resize cfinvokeargument name=cfargument name in component value=#cffile.serverFile# cfinvokeargument name=cfargument name in component value=#form.id#.jpg cfinvokeargument name=cfargument name in component value=250 /cfinvoke ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324025 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
SQL Help
CF 8.01 OS X. I have: cfset sqlToRun = INSERT INTO personalevent(eventid, userid, username, eventdate) VALUES(#FORM.eventidentity#, #FORM.whois#, '#FORM.juser#', '#FORM.eventdate#') cfoutput #sqlToRun# /cfoutput cfquery name=addpersonaleventtome dataSource=cf_WikiData #sqlToRun# /cfquery the cfoutput is: INSERT INTO personalevent(eventid, userid, username, eventdate) VALUES(1, 1, 'jason', '2009-06-27') Which runs fine in a SQL Editor, but running that in the above cfquery I get: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1'', ''1'', ''jason'', ''2009-06-27'')' at line 1 There are a number of extra single quotes that I dont see why. If I try converting to crqueryparam I have something messed up because I get an error: I did: cfset sqlToRun = INSERT INTO personalevent(eventid, userid, username, eventdate) VALUES(cfqueryparam value=#FORM.eventidentity# cfsqltype=CF_SQL_INTEGER, cfqueryparam value=#FORM.whois# cfsqltype=CF_SQL_INTEGER, cfqueryparam value=#FORM.juser# cfsqltype=CF_SQL_VARCHAR, cfqueryparam value=#FORM.eventdate# cfsqltype=CF_SQL_DATE) and I get an error: Invalid CFML construct found on line 22 at column 120. Does anyone see my issue? -Jason ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324026 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SQL Help
if you're going to be generating your SQL like that, you'll need to wrap your final variable in preserveSingleQuotes(). so... cfquery name=addpersonaleventtome datasource=cf_WikiData #preserveSingleQuotes(sqlToRun)# /cfquery it will be pointed out to you (possibly before I even finish composing this response), that you are leaving yourself open to SQL injection attacks by not using cfqueryparam. Hopefully you're at least taking other steps to sanitize the inputs :) On Sun, Jun 28, 2009 at 11:23 AM, Jason Slack applesl...@gmail.com wrote: CF 8.01 OS X. I have: cfset sqlToRun = INSERT INTO personalevent(eventid, userid, username, eventdate) VALUES(#FORM.eventidentity#, #FORM.whois#, '#FORM.juser#', '#FORM.eventdate#') cfoutput #sqlToRun# /cfoutput cfquery name=addpersonaleventtome dataSource=cf_WikiData #sqlToRun# /cfquery the cfoutput is: INSERT INTO personalevent(eventid, userid, username, eventdate) VALUES(1, 1, 'jason', '2009-06-27') Which runs fine in a SQL Editor, but running that in the above cfquery I get: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1'', ''1'', ''jason'', ''2009-06-27'')' at line 1 There are a number of extra single quotes that I dont see why. If I try converting to crqueryparam I have something messed up because I get an error: I did: cfset sqlToRun = INSERT INTO personalevent(eventid, userid, username, eventdate) VALUES(cfqueryparam value=#FORM.eventidentity# cfsqltype=CF_SQL_INTEGER, cfqueryparam value=#FORM.whois# cfsqltype=CF_SQL_INTEGER, cfqueryparam value=#FORM.juser# cfsqltype=CF_SQL_VARCHAR, cfqueryparam value=#FORM.eventdate# cfsqltype=CF_SQL_DATE) and I get an error: Invalid CFML construct found on line 22 at column 120. Does anyone see my issue? -Jason ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324027 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
cfform javascript reference
I have a cfform with the following for reset and submit: a href=## onclick=document.getElementById('form').reset()clear/a a href=## onclick=document.getElementById('form').submit()send/a Clicking the reset button clears the form but the goes to domain.com/#, as does the submit button. I can change it to this, and it works properly, but hovering over the button does not change the pointer. a onclick=document.getElementById('form').reset()clear/a a onclick=document.getElementById('form').submit()send/a Any way to do this? Thanks. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324028 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SQL Help
Right I am switching everything to cfqueryparam as I read about SQL injection. Do you see my Invalid CFML construct found on line 22 at column 120. above though? I still dont. -Jason if you're going to be generating your SQL like that, you'll need to wrap your final variable in preserveSingleQuotes(). so... cfquery name=addpersonaleventtome datasource=cf_WikiData #preserveSingleQuotes(sqlToRun)# /cfquery it will be pointed out to you (possibly before I even finish composing this response), that you are leaving yourself open to SQL injection attacks by not using cfqueryparam. Hopefully you're at least taking other steps to sanitize the inputs :) On Sun, Jun 28, 2009 at 11:23 AM, Jas ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324029 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SQL Help
A) Always use cfqueryparam/. (Note the period.) B) When in doubt, use cfqueryparam/ anyways. (Note the period.) C) While preserveSingleQuotes() can be a useful tool at times, I would have a very difficult time thinking of a time where I would use it. D) Always use cfqueryparam/. (Note again, the period.) E) You cannot use cfqueryparam/ in the midst of a cfset /. F) Always use cfqueryparam/. (Once again, a period.) cfquery INSERT INTO personalevent ( eventid, userid, username, eventdate ) VALUES ( cfqueryparam value=#FORM.eventidentity# cfsqltype=CF_SQL_INTEGER, cfqueryparam value=#FORM.whois# cfsqltype=CF_SQL_INTEGER, cfqueryparam value=#FORM.juser# cfsqltype=CF_SQL_VARCHAR, cfqueryparam value=#FORM.eventdate# cfsqltype=CF_SQL_DATE ); /cfquery G) In case you missed it, ALWAYS use cfqueryparam/. PERIOD. :-) HTH ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324030 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
alternative to cfwindow
I'm wondering with ext:window if we can load up a small window floating over main window (with cf8, yes one can), so as to pop up a tiny floating calendar based on need. Or other options to do that? Thanks. Don ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324031 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfform javascript reference
a href= javascript: functionThatExistsButReturnsFalse( ); onclick= etc( ); etc/a So, accessible to your page you'd have a function mute( ){ return false( ); } And then your buttons could be: a href= javascript: mute( ); onclick=document.getElementById('form').reset()clear/a a href= javascript: mute( ); onclick=document.getElementById('form').submit()send/a You may be able to return false directly in the href, I can't remember. On Sun, Jun 28, 2009 at 12:33 PM, Matthew Smith chedders...@gmail.comwrote: I have a cfform with the following for reset and submit: a href=## onclick=document.getElementById('form').reset()clear/a a href=## onclick=document.getElementById('form').submit()send/a Clicking the reset button clears the form but the goes to domain.com/#, as does the submit button. I can change it to this, and it works properly, but hovering over the button does not change the pointer. a onclick=document.getElementById('form').reset()clear/a a onclick=document.getElementById('form').submit()send/a Any way to do this? Thanks. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324032 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfform javascript reference
Er, function mute( ){ return false; } Not false( ); On Sun, Jun 28, 2009 at 2:15 PM, David McGuigan davidmcgui...@gmail.comwrote: a href= javascript: functionThatExistsButReturnsFalse( ); onclick= etc( ); etc/a So, accessible to your page you'd have a function mute( ){ return false( ); } And then your buttons could be: a href= javascript: mute( ); onclick=document.getElementById('form').reset()clear/a a href= javascript: mute( ); onclick=document.getElementById('form').submit()send/a You may be able to return false directly in the href, I can't remember. On Sun, Jun 28, 2009 at 12:33 PM, Matthew Smith chedders...@gmail.comwrote: I have a cfform with the following for reset and submit: a href=## onclick=document.getElementById('form').reset()clear/a a href=## onclick=document.getElementById('form').submit()send/a Clicking the reset button clears the form but the goes to domain.com/#, as does the submit button. I can change it to this, and it works properly, but hovering over the button does not change the pointer. a onclick=document.getElementById('form').reset()clear/a a onclick=document.getElementById('form').submit()send/a Any way to do this? Thanks. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324033 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: ODBC Date help
My ODBC dates are being siaplyed as: {ts '2009-06-27 00:00:00'} How can I display just as 2009-06-27? Use the dateFormat or lsDateFormat functions. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324034 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Test
Please ignore. I haven't received a disgest for a while. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324035 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Detect data change in cfform
Nathan Wouldn't it make more sense to place a confirmation on the cancel button? Rather than checking all of the data against the original, then asking the user whether it was really what they wanted to do if it's different, then saving/discarding it based on their response? As an aside, if users are clicking cancel by mistake, you may also want to take a look at your UI - the controls should be clear enough that submit/cancel are distinct and difficult to confuse with one another. Gabriel. -Original Message- From: Nathan Chen [mailto:nathan.c...@cu.edu] Sent: Saturday, 27 June 2009 5:28 AM To: cf-talk Subject: RE: Detect data change in cfform Maybe I wasn't clear. Sometimes users would make some changes and then click the cancel button by mistake and find out they lose the changes. I need a routine that detects if data have been altered. Nathan -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Friday, June 26, 2009 11:09 AM To: cf-talk Subject: Re: Detect data change in cfform I am building a form that allows users to edit data retrieved from multiple tables. There are many fields in the form. If the users don't change anything and hit the cancel button, then I don't need to do the update, otherwise several sql update statements will be executed. Is there an easy way to detect if users have made changes to the data in cfform rather than comparing each field to the original data? Not really, but why would your cancel button submit the form? Simply have it do something else, like redirect the user to the previous screen. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324036 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Test
I'll look into it. On Sun, Jun 28, 2009 at 6:41 PM, David Wilsondbutto...@hotmail.com wrote: Please ignore. I haven't received a disgest for a while. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324037 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4