cfdocument putting part of the row on the bottom of page 1 and the other on the top of page 2. Please help!
Hello everybody, I'm new to cfdocument. I'm using it to create pdf documents from data returned by a query with ColdFusion8. The problem is that cfdocument is putting part of the data contained in the table row at the bottom of page 1 and the other on the top of page 2. I know that there is a cfdocumentitem tpye pagebreak attribute (cfdocumentitem type = pagebreak/) which I could use but how do I know when to use this given that the data is dynamic. Can anyone help? Regards, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320096 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Calling GetPageContext within a CFC
Can someone please suggest what should I be doing to call the getPageContext method and display the image and the rest of the page from within the CFC? Hello everybody, I have a cfm template which I refer to in the img src tag (img src=OutputImage.cfm border=1 /) . It outputs the image correctly and as I would expect it to. Here is the code: OutputImage.cfm cfscript Context = getPageContext(); Context.setFlushOutput(false); Response = Context.getResponse().getResponse(); OutputStream = Response.getOutputStream(); Response.setContentType(image/jpeg); OutputImage(session.sessionid,'en',OutputStream); OutputStream.flush(); OutputStream.close(); /cfscript However, when I move the exact same code to a function in a CFC and call it, nothing but the image gets outputted in the browser. Any ideas why this is the case? Is there a different way to call the GetPageContext() method within a CFC? Here is the call: img src=#request.RenderImage()# border=1 / Here is the same code in a cfc. cfcomponent displayname=ImageRenderer cffunction name=RenderImage returntype=void access=public output=true cfscript Context = getPageContext(); Context.setFlushOutput(false); Response = Context.getResponse().getResponse(); OutputStream = Response.getOutputStream(); Response.setContentType(image/jpeg); OutputImage(session.sessionid,'en',OutputStream); OutputStream.flush(); OutputStream.close(); /cfscript /cffunction /cfcomponent I would really appreciate your help. Regards, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318921 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Calling GetPageContext() within a CFC
Hello everybody, I have a cfm template which I refer to in the img src tag (img src=OutputImage.cfm border=1 /) . It outputs the image correctly and as I would expect it to. Here is the code: OutputImage.cfm cfscript Context = getPageContext(); Context.setFlushOutput(false); Response = Context.getResponse().getResponse(); OutputStream = Response.getOutputStream(); Response.setContentType(image/jpeg); OutputImage(session.sessionid,'en',OutputStream); OutputStream.flush(); OutputStream.close(); /cfscript However, when I move the exact same code to a function in a CFC and call it, nothing but the image gets outputted in the browser. Any ideas why this is the case? Is there a different way to call the GetPageContext() method within a CFC? Here is the call: img src=#request.RenderImage()# border=1 / Here is the same code in a cfc. cfcomponent displayname=ImageRenderer cffunction name=RenderImage returntype=void access=public output=true cfscript Context = getPageContext(); Context.setFlushOutput(false); Response = Context.getResponse().getResponse(); OutputStream = Response.getOutputStream(); Response.setContentType(image/jpeg); OutputImage(session.sessionid,'en',OutputStream); OutputStream.flush(); OutputStream.close(); /cfscript /cffunction /cfcomponent I would really appreciate your help. Regards, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318727 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Calling GetPageContext() within a CFC
Hello everybody, I have a cfm template which I refer to in the img src tag (img src=OutputImage.cfm border=1 /) . It outputs the image correctly and as I would expect it to. Here is the code: OutputImage.cfm cfscript Context = getPageContext(); Context.setFlushOutput(false); Response = Context.getResponse().getResponse(); OutputStream = Response.getOutputStream(); Response.setContentType(image/jpeg); OutputImage(session.sessionid,'en',OutputStream); OutputStream.flush(); OutputStream.close(); /cfscript However, when I move the exact same code to a function in a CFC and call it, nothing but the image gets outputted in the browser. Any ideas why this is the case? Is there a different way to call the GetPageContext() method within a CFC? Here is the call: img src=#request.RenderImage()# border=1 / Here is the same code in a cfc. cfcomponent displayname=ImageRenderer cffunction name=RenderImage returntype=void access=public output=true cfscript Context = getPageContext(); Context.setFlushOutput(false); Response = Context.getResponse().getResponse(); OutputStream = Response.getOutputStream(); Response.setContentType(image/jpeg); OutputImage(session.sessionid,'en',OutputStream); OutputStream.flush(); OutputStream.close(); /cfscript /cffunction /cfcomponent I would really appreciate your help. Regards, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318729 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Calling GetPageContext within a CFC
Hello everybody, I have a cfm template which I refer to in the img src tag (img src=OutputImage.cfm border=1 /) . It outputs the image correctly and as I would expect it to. Here is the code: OutputImage.cfm cfscript Context = getPageContext(); Context.setFlushOutput(false); Response = Context.getResponse().getResponse(); OutputStream = Response.getOutputStream(); Response.setContentType(image/jpeg); OutputImage(session.sessionid,'en',OutputStream); OutputStream.flush(); OutputStream.close(); /cfscript However, when I move the exact same code to a function in a CFC and call it, nothing but the image gets outputted in the browser. Any ideas why this is the case? Is there a different way to call the GetPageContext() method within a CFC? Here is the call: img src=#request.RenderImage()# border=1 / Here is the same code in a cfc. cfcomponent displayname=ImageRenderer cffunction name=RenderImage returntype=void access=public output=true cfscript Context = getPageContext(); Context.setFlushOutput(false); Response = Context.getResponse().getResponse(); OutputStream = Response.getOutputStream(); Response.setContentType(image/jpeg); OutputImage(session.sessionid,'en',OutputStream); OutputStream.flush(); OutputStream.close(); /cfscript /cffunction /cfcomponent I would really appreciate your help. Regards, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318733 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: help with using CFCProxy.
Thank you guys for your help. I'll let you know if I face any problems getting it to work with an enterprise license. Regards, John Yeah, you need enterprise to use CFCProxy. I thought they were meant to fix this in 8, under the whole 'Standard is the same as Enterprise, just with limitations' spiel... but it looks like it never happens. Kinda annoys me actually. Mark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318609 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Application.cfc error
Hi Laura, I'm getting this same error. Did you manage to fix this error? Do you remember what the problem was and if so can you kindly share it with me? Regards, John I'm getting an odd error when I try to use Application.cfc instead of Application.cfm. I get the following error: 500 ROOT CAUSE: java.lang.NoClassDefFoundError: Could not initialize class coldfusion. xml.rpc.CFCServlet at coldfusion.cfc.CFCProxy.init(CFCProxy.java:71) at coldfusion.runtime.AppEventInvoker.init(AppEventInvoker. java:47) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter. java:148) ... Any idea what could be causing it? I get the same error no matter if there is code in the cfc or not. Could I have messed up something in my jvm.config file when I was trying to get the debugging set up? Any help is appreciated. Thanks, Laura ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318399 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: help with using CFCProxy.
Do I need the enterprise edition of ColdFusion to use CFCProxy? I'm getting the following error when I instantiate the CFCProxy object: java.lang.NoClassDefFoundError: coldfusion/license/LicenseManager$LicenseIllegalAccessException This is where the error occurs CFCProxy myCFC = new CFCProxy(C:\\Inetpub\\wwwroot\\cfcproxytest\\javacall.cfc); Please provide me with some help. There is no hardly any documentation on this issue. Hello everybody, I want to call ColdFusion objects from a Java class. I found this docucmentation by Ben Forta on CFCProxy: http://www.forta. com/misc/cfcproxy.htm I have a my CFC (see below) that has an init function which initialies all the objects? cfcomponent name=javacall cffunction name=init output=false returntype=javacall hint=initialise cfscript //Example object this.objFont = createObject(java,java.awt.Font).init(Arial,0, 10); return this; /cfscript /cffunction /cfcomponent The documentation says that the getThisScope() method can be used to retrieve the 'This' scope of the CFC. I want to retreive the 'objFont' this variable. Can someone show me how to do this please? Thanks, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318412 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Can't invoke servlet with ColdFusion8!
Hello everybody, I took java Hello World example from this site: http://www.caucho.com/resin-3.0/servlet/tutorial/helloworld/index.xtp I complied it into a class file and copied it to the ColdFusion8\wwwroot\WEB-INF\classes directory. I added the following to the web.xml file (D:\ColdFusion8\wwwroot\WEB-INF) as described in the above article: servlet servlet-namehello/servlet-name servlet-classHelloServlet/servlet-class /servlet servlet-mapping servlet-namehello/servlet-name url-pattern/hello/url-pattern /servlet-mapping This is how I'm calling it in my code: cfscript getPageContext().forward(URLEncodedFormat(/hello)); /cfscript I'm getting the following exception: coldfusion.runtime.TemplateNotFoundException: File not found: /hello What am I doing wrong? I can't figure it out. I would be very greatful to anyone who puts me out of my mysery. I've been trying to get this to work for 2 days now. I am running ColdFusion 8 Developer edition on Windows XP professional. Thanks in advance, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318310 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Can't invoke servlet with ColdFusion8!
When I try to browse the servlet like this: http://127.0.0.1:8501/hello I get the following error: 500 java.lang.NullPointerException at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:285) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) Any ideas? I would really apprecaite your help. Hello everybody, I took java Hello World example from this site: http://www.caucho.com/resin-3.0/servlet/tutorial/helloworld/index.xtp I complied it into a class file and copied it to the ColdFusion8\wwwroot\WEB-INF\classes directory. I added the following to the web.xml file (D:\ColdFusion8\wwwroot\WEB-INF) as described in the above article: servlet servlet-namehello/servlet-name servlet-classHelloServlet/servlet-class /servlet servlet-mapping servlet-namehello/servlet-name url-pattern/hello/url-pattern /servlet-mapping This is how I'm calling it in my code: cfscript getPageContext().forward(URLEncodedFormat(/hello)); /cfscript I'm getting the following exception: coldfusion.runtime.TemplateNotFoundException: File not found: /hello What am I doing wrong? I can't figure it out. I would be very greatful to anyone who puts me out of my mysery. I've been trying to get this to work for 2 days now. I am running ColdFusion 8 Developer edition on Windows XP professional. Thanks in advance, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318311 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
help with using CFCProxy.
Hello everybody, I want to call ColdFusion objects from a Java class. I found this docucmentation by Ben Forta on CFCProxy: http://www.forta.com/misc/cfcproxy.htm I have a my CFC (see below) that has an init function which initialies all the objects? cfcomponent name=javacall cffunction name=init output=false returntype=javacall hint=initialise cfscript //Example object this.objFont = createObject(java,java.awt.Font).init(Arial,0,10); return this; /cfscript /cffunction /cfcomponent The documentation says that the getThisScope() method can be used to retrieve the 'This' scope of the CFC. I want to retreive the 'objFont' this variable. Can someone show me how to do this please? Thanks, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318268 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: 500 Event Handler Exception error when I try to create a java object
Can someone please show me how to load a class file in ColdFusion. I've tried everything from copying the .class file to the C:\CFusionMX7\lib directory to copying it to the C:\CFusionMX7\wwwroot\WEB-INF\classes directory. I don't even know if just by dropping the file to a specific directory is sufficient or if there is something else to do on top of that? Kindly help! Regards, John 500 Event Handler Exception. That's all it says. I've turned on debugging but it doesn't display any debugging information either. On Thursday 15 Jan 2009, cf coder wrote: This is when it throws the exception. What exception ? -- Tom Chiverton Helping to appropriately transform market-growth This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318055 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: 500 Event Handler Exception error when I try to create a java object
Can someone please show me how to load a class file in ColdFusion. I've tried everything from copying the .class file to the C:\CFusionMX7\lib directory to copying it to the C:\CFusionMX7\wwwroot\WEB-INF\classes directory. I don't even know if just by dropping the file to a specific directory is sufficient or if there is something else to do on top of that? Kindly help! Regards, John 500 Event Handler Exception. That's all it says. I've turned on debugging but it doesn't display any debugging information either. On Thursday 15 Jan 2009, cf coder wrote: This is when it throws the exception. What exception ? -- Tom Chiverton Helping to appropriately transform market-growth This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318056 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
500 Event Handler Exception error when I try to create a java object
Hello everybody, I have used the Employee.java example on the adobe livedocs (http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Java_7.html). Pleae Scroll down to the section titled Creating and using a simple Java class. I am running ColdFusion 7 server installation, developer version running on windows xp professional. Server Product ColdFusion MX Version 7,0,2,142559 Edition Developer I complied the file Employee.java, and place the resulting Employee.class file in a directory in the C:\CFusionMX7\wwwroot\WEB-INF\classes folder. Is this right? The article on livedocs states that Save the following Java source code in the file Employee.java, compile it, and place the resulting Employee.class file in a directory that is specified in the classpath. How can I see the classpath? Is this the CLASSPATH environment variable or the CF Classpath? Any help would be most appreciated. Regards John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317979 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: 500 Event Handler Exception error when I try to create a java object
This is how I am trying to create the object. cfset objEmp = createObject(java,Employee) / cfdump var=#objEmp# This is when it throws the exception. Hello everybody, I have used the Employee.java example on the adobe livedocs (http://livedocs.adobe.com/coldfusion/8/htmldocs/help. html?content=Java_7.html). Pleae Scroll down to the section titled Creating and using a simple Java class. I am running ColdFusion 7 server installation, developer version running on windows xp professional. Server ProductColdFusion MX Version 7,0,2,142559 Edition Developer I complied the file Employee.java, and place the resulting Employee. class file in a directory in the C:\CFusionMX7\wwwroot\WEB-INF\classes folder. Is this right? The article on livedocs states that Save the following Java source code in the file Employee.java, compile it, and place the resulting Employee.class file in a directory that is specified in the classpath. How can I see the classpath? Is this the CLASSPATH environment variable or the CF Classpath? Any help would be most appreciated. Regards John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317980 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: FreeTTS API implementation doesn't work in ColdFusion7
Hi Isaac, Thanks for your reply. I actually found this little helloworld freeTTS example online: http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Sound;action=display;num=1204335245 I want to write a simple HelloWorld example in ColdFusion. I've got all the jar files I need. cmudict04.jar cmulex.jar cmutimelex.jar cmu_time_awb.jar cmu_us_kal.jar en_us.jar freetts.jar jsapi.jar would you be albe to show me how to do this in ColdFusion please? cfset Voice = createObject(java,com.sun.speech.freetts.Voice) / cfset VoiceManager = createObject(java,com.sun.speech.freetts.VoiceManager) / cfset voiceInstance = Voice cfset voiceName[1] = kevin16 cfset VoiceMgrInstance = VoiceManager.getInstance() cfset voiceInstance = VoiceMgrInstance.getVoice(voiceName) cfdump var=#voiceInstance# Your help on this matter is greatly appreciated. Regards, John cfset BootstrapClassLoader = createObject(java, coldfusion.bootstrap.Boot strapClassLoader).SystemClassLoader.newInstance(com.sun.speech.freetts.Voic eManager) cfset VoiceManager = createObject(java, coldfusion.runtime.java.JavaProxy ).init(BootstrapClassLoader) cfset Application.VoiceManagerInstance6 = VoiceManager.Instance I'm not the most knowledgeable expert with regard to Java, but this just looks to me like it was written by someone with Java experience, who didn't bother to even test anything in ColdFusion and instead simply assumed (wrongly) that everything in CF would work exactly the way he's used to things working in Java... blech... Random guess (I haven't tried this), replace the entire 3 lines with this: VMInstance = CreateObject(java,com.sun.speech.freetts.VoiceManager); Then set Application.VoiceManager6 to that. The extra classes he created look to me like classes that are probably instantiated automatically by CreateObject(), so using CreateObject to instantiate them would be (I believe) just doubling up on those classes and actually slowing them down, since you would be reflecting the reflection. That's just a guess, but that's what it looks like to me. -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 781.769.0723 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317986 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: 500 Event Handler Exception error when I try to create a java object
500 Event Handler Exception. That's all it says. I've turned on debugging but it doesn't display any debugging information either. On Thursday 15 Jan 2009, cf coder wrote: This is when it throws the exception. What exception ? -- Tom Chiverton Helping to appropriately transform market-growth This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317991 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Using JCaptcha and FreeTTS to embed captcha and audio for the visually impaired
We have decided to use a differnt API for the captcha. Regarding the speech, FreeTTS is the API that we want to use. I have been looking at this example which shows how to call it in ColdFusion (Please look at the second example titled: FreeTTS CFC): http://www.cfide.org/Text_to_Speech_Example_page.cfm Unfortuanately you can't copy it as it is an image. I've typed in the first 3 lines of code: cfset BootstrapClassLoader = createObject(java, coldfusion.bootstrap.BootstrapClassLoader).SystemClassLoader.newInstance(com.sun.speech.freetts.VoiceManager) cfset VoiceManager = createObject(java, coldfusion.runtime.java.JavaProxy).init(BootstrapClassLoader) cfset Application.VoiceManagerInstance6 = VoiceManager.Instance I've copied the freetts.jar file which you can donwload from here (http://downloads.sourceforge.net/freetts/freetts-1.2.1-bin.zip?modtime=1110396608big_mirror=0), to my lib folder (C:\ColdFusionMX\lib) and it is in the coldfusion class-path. When I run the above code, I get an error: The selected method newInstance was not found. Either there are no methods with the specified method name and argument types, or the method newInstance is overloaded with arguments types that ColdFusion can't decipher reliably. If this is a Java object and you verified that the method exists, you may need to use the javacast function to reduce ambiguity. Does anyone know why this is? Regards, John I am hoping someone could provide me with some help in implementing this on my application. I am running ColdFusion 7 on a Windows Server. I have been asked to display a image and audio captcha in my form. I've visited both the JCpatcha and FreeTTS websites. I would recommend that you avoid implementing CAPTCHAs at all. That's probably not the answer you're looking for, but they're terrible solutions from an accessibility perspective. Instead, you might look at something like CFFormProtect (http://cfformprotect.riaforge.org/), which lets you block spammers just as effectively without the accessibility problems of CAPTCHAs. Your client may have specifically requested a CAPTCHA, but ideally the developer should recommend alternative solutions when those solutions are clearly superior. 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! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317841 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
FreeTTS API implementation doesn't work in ColdFusion7
Hello everybody, I want to use the FreeTTS API to allow people with disabilies to have a better experience. I have been looking at this example which shows how to call it in ColdFusion (Please look at the second example titled: FreeTTS CFC): http://www.cfide.org/Text_to_Speech_Example_page.cfm Unfortuanately you can't copy it as it is an image. I've typed in the first 3 lines of code: cfset BootstrapClassLoader = createObject(java, coldfusion.bootstrap.BootstrapClassLoader).SystemClassLoader.newInstance(com.sun.speech.freetts.VoiceManager) cfset VoiceManager = createObject(java, coldfusion.runtime.java.JavaProxy).init(BootstrapClassLoader) cfset Application.VoiceManagerInstance6 = VoiceManager.Instance I've copied the freetts.jar file which you can donwload from here (http://downloads.sourceforge.net/freetts/freetts-1.2.1-bin.zip?modtime=1110396608big_mirror=0), to my lib folder (C:\ColdFusionMX\lib) and it is in the coldfusion class-path. When I run the above code, I get an error: The selected method newInstance was not found. Either there are no methods with the specified method name and argument types, or the method newInstance is overloaded with arguments types that ColdFusion can't decipher reliably. If this is a Java object and you verified that the method exists, you may need to use the javacast function to reduce ambiguity. Does anyone know why this is? Regards, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317842 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Using JCaptcha and FreeTTS to embed captcha and audio for the visually impaired
Hi everybody, I am hoping someone could provide me with some help in implementing this on my application. I am running ColdFusion 7 on a Windows Server. I have been asked to display a image and audio captcha in my form. I've visited both the JCpatcha )http://jcaptcha.sourceforge.net/) and FreeTTS (http://freetts.sourceforge.net/docs/index.php) websites. I have not been able to find any help online on how to set up the jar files in coldfusion. My Java knowledge is very very basic. Would anyone be kind enough to show me or at least point me to the right direction? I look forward to hearing from you Regards, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317750 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Using JCaptcha and FreeTTS to embed captcha and audio for the visually impaired
Hi Sam, Thank you for your post. I have copied the files FreeTTS.jar file to my standalone ColdFusion installation folder: C:\CFusionMX7\lib\freetts.jar. I restarted ColdFusion and the jar file is now showing up in the class-path which is good. I can dump the methods in the FreeTTS class like this: cfset freettsObj = CreateObject(java, com.sun.speech.freetts.FreeTTS)/ cfdump var=#freettsObj#cfabort Please follow this link to see the list of classes and packages. http://freetts.sourceforge.net/javadoc/index.html I'm getting somewhere but I don't know how to invokve the textToSpeech() method of the FreeTTS class. Basically, I want to pass a string to this function (the text that the captch randomly generates) and to convert this text to speeach/voice. When I get an error when I try to call this method in my code: cfset freettsObj.textToSpeech(randomStr) / The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Null Pointers are another name for undefined values. Any ideas? Hi everybody, application specific jar files usually go in webapps/application_name/web-inf/lib Sam ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317759 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SQL help..
Hello there, I do appreciate this isn't the right forum for posting this question but I have posted my question in the SQL forum but I haven't heard anything back. It's a very straightforward query... at least I hope it is for someone with good sql skills. I was hoping someone could help here. I have a table called 'phone_numbers' with two columns, one called 'person_name' and the other called 'number'. A person can have more than one number and I want the query to return all person's that have more than 3 numbers. Jamie 1 Jamie 2 Jamie 3 Jamie 4 Allan 5 Vicki 6 Marilyn 7 Paul8 Scott 9 Scott 10 Scott 11 Scott 12 So in the above example, the query would return Jamie and Scott. How do I get this data? Regards, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314540 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..
I'm really greatful to you for the post. Just answered this on the SQL list: http://www.houseoffusion.com/groups/sql/thread.cfm/threadid:855 ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314544 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
ReFind - help with regex (ColdfusionMX 7)
Hello everybody, I need your help with regular expressions. I want to loop through a directory in my codebase and return a list of href tags. The href value for ex must be in this format. #request.udf.geturl(NUMERIC VALUE,STRING)# a href=#request.udf.geturl(111,pagename)# class=btn title=FreeFREE/a Here's what I have for now: cfset thisPath = ExpandPath( \view) cfdirectory action=list directory=#thisPath# name=viewDir recurse=true filter=dsp_*.cfm / Processing #viewDir.recordcount# files.. br/ cfloop query=viewDir #viewDir.name# cffile action=read file=#viewDir.directory#\#viewDir.name# variable=contents charset=utf-8 !--- Regex goes here! --- /cfloop Can someone do me a big favour and send me the regular expression to match the string in the way I have mentioned? Many thanks in advance. Regards, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310854 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: ReFind - help with regex (ColdfusionMX 7)
Is someone willing to help me with my problem? I would very much appreciate your help. Regards, J Hello everybody, I need your help with regular expressions. I want to loop through a directory in my codebase and return a list of href tags. The href value for ex must be in this format. #request.udf.geturl(NUMERIC VALUE, STRING)# a href=#request.udf.geturl(111,pagename)# class=btn title=FreeFREE/a Here's what I have for now: cfset thisPath = ExpandPath( \view) cfdirectory action=list directory=#thisPath# name=viewDir recurse=true filter=dsp_*.cfm / Processing #viewDir.recordcount# files.. br/ cfloop query=viewDir #viewDir.name# cffile action=read file=#viewDir.directory#\#viewDir.name# variable=contents charset=utf-8 !--- Regex goes here! --- /cfloop Can someone do me a big favour and send me the regular expression to match the string in the way I have mentioned? Many thanks in advance. Regards, John ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310870 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: ReFind - help with regex (ColdfusionMX 7)
Hi Will, I sincerely apologise to you and to anyone else who got the impression that I was someone who jsut wanted a quick solution. I began working on this yesterday evening, I have spent all of today trying out different things but have not had any luck yet. This is what I've managed so far: cfset tmp = ReFind('(a href=(.+?).*?)(.+?)(\/a)', contents, 1, true) / I think I'm right in saying that I don't have to match the a href, I'm only interested in #request.udf.geturl(NUMERIC VALUE,STRING)# Is someone willing to help me with my problem? I would very much appreciate your help. Regards, J I'll tell you what I do in situations like this. I read info/books about Regexs and try to solve it myself. I may work on a problem for hours without finding a solution. Then, if I can't figure it out, I'll post the non-working code I've been working on to the list. Other folks on the list know I've at least ATTEMPTED to solve my own problem and may be more inspired to help out. If you simply want someone else to write code for you, you're on the wrong list Shoot, Regexs are just too cool not to learn anyway. :) Will ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310879 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Help with Rewrite Rule! (circuit.fuseaction)
hello everyody, Can someone please help? I'm struggling to find a solution to my problem. Any help will be greatly appreciated. Thanks, cfcoder Can you show me an example to demonstrate what you mean? I don't know much about writing RewriteRules or regular expressions. Regards, cfcoder Would using the end of string character ($) help with limiting things? Adrian I already tried that. This is the order: RewriteRule /offers/books/([a-zA-Z0-9.-]+)(.*) /index.cfm?go=offers\. $1 [PT] RewriteRule /offers(/books/.*) /index.cfm?go=offers.detailsbookid=${mapfile:$1} I can browse this page (it's working): http://mysite/offers/books/all but when I try to browse this page: http://mysite/offers/books/Harry-Potter I get an error which states: This is the template ../fuseboxShared/ErrorTemplates/fusebox.undefinedFuseaction.cfm An Error of type fusebox.undefinedFuseaction has occurred undefined Fuseaction You specified a Fuseaction of Harry-Potter which is not defined in Circuit books. The first rule is getting executed and this is what's causing the error. Any ideas? Put the RewriteRule for books.all first. Russ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300299 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Help with Rewrite Rule! (circuit.fuseaction)
Ok, I think what I'm trying to achieve is possible with a RewriteCond. Can someone please show me how to use RewriteCond? The condition should say, if there is a bookid query parameter run this rule: RewriteRule /offers(/books/.*) /index.cfm?go=offers.detailsbookid=${mapfile:$1} hello everyody, Can someone please help? I'm struggling to find a solution to my problem. Any help will be greatly appreciated. Thanks, cfcoder Can you show me an example to demonstrate what you mean? I don't know much about writing RewriteRules or regular expressions. Regards, cfcoder Would using the end of string character ($) help with limiting things? Adrian I already tried that. This is the order: RewriteRule /offers/books/([a-zA-Z0-9.-]+)(.*) /index. cfm?go=offers\. $1 [PT] RewriteRule /offers(/books/.*) /index.cfm?go=offers.detailsbookid=${mapfile:$1} I can browse this page (it's working): http://mysite/offers/books/all but when I try to browse this page: http://mysite/offers/books/Harry-Potter I get an error which states: This is the template ../fuseboxShared/ErrorTemplates/fusebox.undefinedFuseaction.cfm An Error of type fusebox.undefinedFuseaction has occurred undefined Fuseaction You specified a Fuseaction of Harry-Potter which is not defined in Circuit books. The first rule is getting executed and this is what's causing the error. Any ideas? Put the RewriteRule for books.all first. Russ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300304 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Help with Rewrite Rule! (circuit.fuseaction)
Can someone please tell me if this is the write syntax? I want the rule to only execute if there is a 'bookid' in the incoming url. RewriteCond %{QUERY_STRING} bookid RewriteRule /offers(/books/.*) /index.cfm?go=offers.detailsbookid=${mapfile:$1} Ok, I think what I'm trying to achieve is possible with a RewriteCond. Can someone please show me how to use RewriteCond? The condition should say, if there is a bookid query parameter run this rule: RewriteRule /offers(/books/.*) /index.cfm?go=offers. detailsbookid=${mapfile:$1} hello everyody, Can someone please help? I'm struggling to find a solution to my problem. Any help will be greatly appreciated. Thanks, cfcoder Can you show me an example to demonstrate what you mean? I don't know much about writing RewriteRules or regular expressions. Regards, cfcoder Would using the end of string character ($) help with limiting things? Adrian I already tried that. This is the order: RewriteRule /offers/books/([a-zA-Z0-9.-]+)(.*) /index. cfm?go=offers\. $1 [PT] RewriteRule /offers(/books/.*) /index.cfm?go=offers.detailsbookid=${mapfile:$1} I can browse this page (it's working): http://mysite/offers/books/all but when I try to browse this page: http://mysite/offers/books/Harry-Potter I get an error which states: This is the template ../fuseboxShared/ErrorTemplates/fusebox.undefinedFuseaction. cfm An Error of type fusebox.undefinedFuseaction has occurred undefined Fuseaction You specified a Fuseaction of Harry-Potter which is not defined in Circuit books. The first rule is getting executed and this is what's causing the error. Any ideas? Put the RewriteRule for books.all first. Russ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300314 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Help with Rewrite Rule! (circuit.fuseaction)
Can you show me an example to demonstrate what you mean? I don't know much about writing RewriteRules or regular expressions. Regards, cfcoder Would using the end of string character ($) help with limiting things? Adrian I already tried that. This is the order: RewriteRule /offers/books/([a-zA-Z0-9.-]+)(.*) /index.cfm?go=offers\.$1 [PT] RewriteRule /offers(/books/.*) /index.cfm?go=offers.detailsbookid=${mapfile:$1} I can browse this page (it's working): http://mysite/offers/books/all but when I try to browse this page: http://mysite/offers/books/Harry-Potter I get an error which states: This is the template ../fuseboxShared/ErrorTemplates/fusebox.undefinedFuseaction.cfm An Error of type fusebox.undefinedFuseaction has occurred undefined Fuseaction You specified a Fuseaction of Harry-Potter which is not defined in Circuit books. The first rule is getting executed and this is what's causing the error. Any ideas? Put the RewriteRule for books.all first. Russ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300239 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Help with Rewrite Rule! (circuit.fuseaction)
I already tried that. This is the order: RewriteRule /offers/books/([a-zA-Z0-9.-]+)(.*) /index.cfm?go=offers\.$1 [PT] RewriteRule /offers(/books/.*) /index.cfm?go=offers.detailsbookid=${mapfile:$1} I can browse this page (it's working): http://mysite/offers/books/all but when I try to browse this page: http://mysite/offers/books/Harry-Potter I get an error which states: This is the template ../fuseboxShared/ErrorTemplates/fusebox.undefinedFuseaction.cfm An Error of type fusebox.undefinedFuseaction has occurred undefined Fuseaction You specified a Fuseaction of Harry-Potter which is not defined in Circuit books. The first rule is getting executed and this is what's causing the error. Any ideas? Put the RewriteRule for books.all first. Russ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300173 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Help with Rewrite Rule! (circuit.fuseaction)
Thank you Kay for suggesting this. It has done the trick. I'm really glad I don't have to change every single link on the site. I have another nagging problem and would appreciate anybody's help. I'll try to explain as best as I can. I want to a RewriteRule that can do the following: I have a rule that translates: http://mysite/index.cfm?offers.booksbookid=1 to: http://mysite/offers/books/Harry-Potter And the rule that does this is: RewriteRule /offers(/books/.*) /index.cfm?go=offers.detailsbookid=${mapfile:$1} The mapfile.txt file contains the book keyword and bookid, ex: /books/Harry-Potter 1 and a rule that translates: http://mysite/index.cfm?go=books.all to: http://mysite/offers/books/all And the rule that does this is: RewriteRule /offers/books/([a-zA-Z0-9.-]+)(.*) /index.cfm?go=offers\.$1 [PT] Here's the problem: When I try to browse this page: http://mysite/offers/books/all; the browser gets confused because the regular expression pattern for both the rules have the same pattern i.e /offers/books/. I hope this is making sense. I want to change my rule which works in both the cases. Thanks in advance. Regards, cfcoder On Fri, Feb 29, 2008 at 1:46 AM, cf coder [EMAIL PROTECTED] com wrote: however none of the images on this page get displayed. I looked at an image property and the src which had the following src: http://mysite/offers/books/images/bookimage/somebook.gif I want it to be http://mysite/images/bookimage/somebook.gif Try base href=http://mysite/; / (in the head of your document). That will cause all css, js, image and links on the page to use http://mysite/ as the base of relative requests. -- Kay Smoljak business: www.cleverstarfish.com standards: kay.zombiecoder.com coldfusion: kay.smoljak.com personal: goatlady.wordpress. com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300163 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Help with Rewrite Rule! (circuit.fuseaction)
Hi Adrian, I added the L flag but that didn't make any difference as I'm still getting the error. Also, use the L flag to stop processing rules. Adrian Put the RewriteRule for books.all first. Russ cfcoder ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300181 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Help with Rewrite Rule! (circuit.fuseaction)
Hi guys, I have one more questions on this topic. I've added a handful of rules and they work however all of the images on the site are broken. I have a virtual directory in IIS for my site called images and all the img tags on my pages start with for ex: images/foldername/imagename.gif. I don't want to change all the img tags in my site to http://domainname/images/etcetc..; Is there a better solution.. Your help on this matter are much appreciated. Regards, cfcoder Oops... Didn't see Barney's reply... weird that when you click on the Archive link it only bring up a single message, not the whole thread. Russ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300054 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Help with Rewrite Rule! (circuit.fuseaction)
Here's an example, I have a rule that translates http://mysite/index.cfm?offers.booksbookid=1 to http://mysite/offers/books/somebook however none of the images on this page get displayed. I looked at an image property and the src which had the following src: http://mysite/offers/books/images/bookimage/somebook.gif I want it to be http://mysite/images/bookimage/somebook.gif where images is a virtual directory. Can anybody please suggest how this can be done? Regards, cfcoder ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300099 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Help with Rewrite Rule! (circuit.fuseaction)
Hi guys, I need your help writing rules for my coldfusion/fusebox application. I've installed Helicon rewrite engine and am using IIS webserver. I want to convert the following link: /index.cfm?payment.home to a SEO Safe url something like this: /secure/payment/ (excluding the text home) However the url should include the fuseaction on all other pages for the payment circuit. So for example, if I had a circuit.fuseaction called payment.creditcard or payment.debitcard, I want the url to look like /secure/payment/creditcard /secure/payment/debitcard RewriteRule /secure/payment/([a-zA-Z0-9]+)(.*) /index.cfm?go=payment\.$1 [PT] (This is a basic rule that I have not yet tested, but you get the idea). This rule works for /secure/payment/creditcard and /secure/payment/debitcard but not for the example where I don't want to include home. I hope this is making sense. Any help on this query will be really appreciated. Kind regards, cfcoder ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299941 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Help with Rewrite Rule! (circuit.fuseaction)
Works like a charm. Thank you Russ and Barney. Thansk and Regards, cfcoder Wow, can't believe nobody's answered this yet. RewriteRule ^/secure/([^/]+)/*$/index.cfm?$1.home Russ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:23 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: regex help
Thank you Jason, Craig and Bobby for your help which is greatly appreciated. However this is not quite what I want. I do apologise for changing my original requirement. I'll try to explain. I want to read the contents of all the .cfm files in a directory and return all the href tags with the productID= text in the query string, ex: a href=somesite.com/index.cfm?action=getproductID=1test/a When I did a search in the codebase for productID=, I found there were few a tags which looked like this: a title=Find out more href=somesite.com/index.cfm?action=getproductID=1 onclick=somefunction()img src=exmaple.gif alt=some alt I want the regular expression to be able to match the above example as well. If it is not too much of an inconvenience can you please send me the revised code? Regard, cfcoder EDIT: The regex should be this one instead. The one above would not handle any thing between the href= and the closing . (a[^]*href=[ '](([^']*)?([^']ProductID=?([^']*)[^']*))['][^]*([^]*)\/a) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299255 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: regex help
Actually, please ignore my last message. I have got it to work: reFindNoCase(a[ ][\w -~]+productID=[ -~]+/a,inputString, pos) Thank you everybdoy for your help. Regards, cfcoder Thank you Jason, Craig and Bobby for your help which is greatly appreciated. However this is not quite what I want. I do apologise for changing my original requirement. I'll try to explain. I want to read the contents of all the .cfm files in a directory and return all the href tags with the productID= text in the query string, ex: a href=somesite.com/index.cfm?action=getproductID=1test/a When I did a search in the codebase for productID=, I found there were few a tags which looked like this: a title=Find out more href=somesite.com/index. cfm?action=getproductID=1 onclick=somefunction()img src=exmaple. gif alt=some alt I want the regular expression to be able to match the above example as well. If it is not too much of an inconvenience can you please send me the revised code? Regard, cfcoder EDIT: The regex should be this one instead. The one above would not handle any thing between the href= and the closing . (a[^]*href=[ '](([^']*)?([^']ProductID=?([^']*)[^']*))['][^]*([^]*)\/a) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299256 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: regex help
pardon me saying this but it looks very complicated. I rather just write a regex that will do this effortlessley. Regards, cfcoder I need some help with regular expressions. What you need is the kind of requirement I made CF_REextract for. See http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299089 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
regex help
Hello everybody, I need some help with regular expressions. I'm trying to write a reqular expression that will return all the links on a page that contain a string in the query string. I found a UDF on cflib that returns a list of all the anchor tags on a page but I want to only return all href tags that contain the word ProductID in the query string ex: a href=somesite.com/index.cfm?action=getproductID=1test/a Here is the udf, that returns all the links on the page. function hrefsToList(inputString) { var pos=1; var tmp=0; var linklist = ; var delimiter = ,; var endpos = ; if(arrayLen(arguments) gte 2) delimiter = arguments[2]; while(1) { tmp = reFindNoCase(a[^]*[^]*/a, inputString, pos); if(tmp) { pos = tmp; endpos = findNoCase(/a, inputString, pos)+4; linkList = listAppend(linkList, mid(inputString, pos, endpos-pos), delimiter); pos = endpos; } else break; } return linkList; } Can someone please show me how to change the modify expression to return what I've explained above please? Thanks, cfcoder ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299082 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: regex help
I would prefer the regular expression to do this. Can you show me how to do what you are suggesting please? If you don't manage to get what you're after. Just loop over the array and look for the string. Adrian Hello everybody, I need some help with regular expressions. I'm trying to write a reqular expression that will return all the links on a page that contain a string in the query string. I found a UDF on cflib that returns a list of all the anchor tags on a page but I want to only return all href tags that contain the word ProductID in the query string ex: a href=somesite.com/index.cfm?action=getproductID=1test/a Here is the udf, that returns all the links on the page. function hrefsToList(inputString) { var pos=1; var tmp=0; var linklist = ; var delimiter = ,; var endpos = ; if(arrayLen(arguments) gte 2) delimiter = arguments[2]; while(1) { tmp = reFindNoCase(a[^]*[^]*/a, inputString, pos); if(tmp) { pos = tmp; endpos = findNoCase(/a, inputString, pos)+4; linkList = listAppend(linkList, mid(inputString, pos, endpos-pos), delimiter); pos = endpos; } else break; } return linkList; } Can someone please show me how to change the modify expression to return what I've explained above please? Thanks, cfcoder ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299085 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Worldpay Integration Help!
Hello everybody, I'm working on an e-commerce website which uses Worldpay's Select Junior service to connect my online store to worldpay. To give you an overview, users visiting the site can add items to the shopping basket. I want to send the users to worldpay to enter their card details and allow Worldpay to verify the card details and if successful send the user back to my site to display the transaction status (successful/unsuccessful) message. I've received the Select Junior account Test ID and the username password to login to the worldpay Customer Management System. All that is left is to send the user to the worldpay site to input and verify the card details. But before I make the site live I want to test the worldpay integration but I don't know what page to send the users to and what information to send the worldpay. Can anybody please help me resolve this problem. Many thanks in advance, cfcoder ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243444 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Worldpay Integration Help!
Hi Mark, I've looked on the the worldpay support website: http://support.worldpay.com/integrations/jnr/data.html but can't find any url which I could use to send the users to enter the card information. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243455 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Worldpay Integration Help!
what page do I link to on worldpay when the user is ready to enter his/her payment details? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243457 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Worldpay Integration Help!
thanks for this. What do I do to tell worldpay to redirect the users back to my site and display the transaction status i.e success or failure Go here: http://support.worldpay. com/kb/integration_guides/junior/integration/help/sjig.html Click on getting started Click on basic purchase submission form Then continue to RTFM cf coder wrote: what page do I link to on worldpay when the user is ready to enter his/her payment details? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243470 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Worldpay Integration Help!
sorry folks! I am in a bit of a panic state and so do apologise for being a bit cheesey. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243474 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Session Variables lost when moving from http to https - Please help!
Thank you Matt for the detailed explaination. I went back to review the code yesterday and here is what I found. The regular domain webroot is C:\inetpub\wwwroot\web\content folder. There is an application.cfm file in this folder and a cfapplication tag. When the site is opened in a browser the application/session variables are set, ex: http://www.testsite.com/index.cfm The view basket cfm page is in the content folder (C:\inetpub\wwwroot\web\content) under the webroot. The template that gets called when the user hits a href=https://www.secureweb.co.uk/testsite/order.cfm?CFID=3107295CFTOKEN=20059956;Proceed/a PROCEED from viewbasket.cfm is in a folder under the webroot called secure (C:\inetpub\wwwroot\web\secure\order.cfm). I noticed yesterday that the application.cfm file was not present in the secure folder. I copied it over from the content folder. There is a cfinclude tag in application.cfm that calls a template in the content folder cfinclude template=content/appvars.cfm. I'm getting a file not found error message and that's because the secure site does not have a folder called content. Is there a way round this, i.e by adding a virtual directory in IIS or ColdFusion mapping? My hosting provider has provided with a readme.txt file with instructions: WEB --- This directory is the location for files connected with your web site and contains the following directories. CONTENT SECURE * (Platinum Plus customers only) CONTENT --- This is the directory that you should upload your web site files to. Inside this directory is a file named default.asp which is a placeholder for your web site. If you are creating code that requires the physical path on the web server to this directory then it will be as follows: d:\inetpub\DOMAINNAME\web\ Replace the word domain name with your primary web site domain. For example, if the site you have signed up for is named www.mysite.com then the path would be d:\inetpub\mysite.com\web\ The CONTENT directory also contains a further directory named CGI-BIN which should be used as the location for Perl and cgi files. By default the file extension recognised on this server for Perl and cgi files is .pl SECURE (Platinum Plus customers only) - Under the Platinum Plus package you have access to our shared secure server. The directory SECURE is the directory to which you should upload files that should appear under the secure site. I would really appreciate your help. Thanks, cfcoder ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242553 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Session Variables lost when moving from http to https - Please help!
Hello Will, I am storing query objects in request and session variables. I can't send this info over the url query. The https link links to a different domain because my site is hosted by a company that provides the access to shared secure server. I understand the point made by someone earlier that the sessions are associated with a single domain/server and there isn't a simple solution to maintaining the sessions over multiple domains. I'm just not convinced that the only way to keep the sessions over multiple domains is to pass the data in url querystring or store the data in a temp table. -cfcoder ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242296 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Session Variables lost when moving from http to https - Please help!
Josh, its not just the request scope variables that are undefined, I tried dumping the application and session scope variables but got the same undefined error message. -cfcoder ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242297 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Session Variables lost when moving from http to https - Please help!
I tried that. I passed #session.URLToken# in the url query string but I still got an error when I tried to dump the session scope variable, cfdump var=#session# Any ideas? PS: The main site domain and the secure site doamin names are not the same although the codebase is the same. wwwroot\order\viewbasket.cfm (http) wwwroot\secure\proceedToSecuresite.cfm (https) Thanks - cfcoder ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242304 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Session Variables lost when moving from http to https - Please help!
On viewbasket.cfm (wwwroot\order\viewbasket.cfm) I added the following code: tdform action=https://securesite/proceedToSecuresite.cfm?#session.URLToken#; method=postinput type=Image src=proceed.gif border=0/form/td I didn't include it in every single page. I thought I'll first test if this works. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242306 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Session Variables lost when moving from http to https - Please help!
Yes its definately the same physical server. I have no clue as to why the session, application, server, form, request scope variables are not available on the https domain. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242311 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Session Variables lost when moving from http to https - Please help!
Is there a ColdFusion I can use on the https site to return the server settings i.e webserver version, application name, etc etc. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242312 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Session Variables lost when moving from http to https - Please help!
I added a cfdump tag to dump the server and application strucutre and saw the server dump but got an error for outputting the application dump: cfdump var=#server# cfdump var=#application# cfabort I'll have to contact the hosting provider to see what's going on. It is not making sense. I've probably got to undestand how the website is set up and get some answers from the hosting provider. Thank you all for your help - cfcoder ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242317 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Session Variables lost when moving from http to https - Please help!
Hello Everybody, I need your help solving this problem. Any help will be much appreciated. I am working on a a shopping cart page that stores the items ordered in a request scope variable. The usual stuff i.e you add an item to a basket and view your basket where you check the total price and postage options. The proceed button on this page sends the user to a secure site (https). The problem I'm having is once I go from http to https, the session will disappears and I get a Element is undefined in REQUEST error. I also get an error when I try to dump the application and session scope variables. Can anybody tell me how to fix this problem? I have run out of ideas. Best regards, cfcoder ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242160 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Session Variables lost when moving from http to https - Please help!
thank you all for your help and advise. I'll take a butchers at it tomorrow as it is pretty late in the night here in the UK. Cheers, cfcoder ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242175 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Regular Expressions - Strip HTML tags. Please help!!!
Thank you guys for pointing me to the right direction. The udf StripTags is really god sent. Thanks cfcoder CFLib.org is your friend :) Check out the function called StripTags. It does exactly what you want. http://www.cflib.org/udf.cfm?ID=774 Cedric ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238004 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Regular Expressions - Strip HTML tags. Please help!!!
Hello Everybody, I need your help with regular expressions. I'm trying to strip out HTML tags from a string to pass it to a flash movie. I've found a script that does this but the problem is that I want to keep some html formatting specifically the following tags: b, br, span, i, strong, div, p Here is the code: cfscript function StripHTML(str) { return REReplaceNoCase(str,[^]*,br,ALL); } /cfscript cfset logtext = table trtdpspan class=bodyThis is some example text/span/p/td/tr trtdbFriday 17 march, 2006/bbr12:54 PM/td/tr /table cfset str = StripHTML(logtext) The above script strips out the everything between the opening and closing angle brackets and . Is there any way to tell the regular expression to do the above but not process the following tags: b, br, span, i, strong, div, p I would be really greatful if someone could post the regular expression to do this. Best regards, cfcoder ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237683 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Regular Expression Help
Hello Everybody, I'm having problems writing a regular expression. I'm trying to pass a string to flash and want to strip off and replace the html tags with a br tag but also leave any b, span, i, strong, div, br, and p tags. This is what I've done so far: cfscript function StripHTML(str) { return REReplaceNoCase(str,[^]*,br,ALL); } /cfscript cfse logtext = tabletrtdpThis is not real text/p/td/tr trtdbFriday 17 march, 2006/b/td/tr/table cfset str = StripHTML(logtext) The above function strips out any html tag and replaces it with a br tag. This is fine but I want to keep the span, i, b, strong, div, br, p tags and dont know how to tell it to ignore these tags and replace everything else with a and angle brackets. Can someone please help me with this. I am just not good at this sort of things. Thanks, cfcoder ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237716 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
embedding an image in cfmail
Is it possible to do this in ColdFusion 6.1? I ask this because the email that is sent via cfmail has a div tag in it with the style background-image attribute and when I try to open the email in ms outlook, I get prompted to enter the username and password. I have XP Professional SP2 running on my desktop. Kindly take a look at my code: cfmail type=html from=[EMAIL PROTECTED] to=[EMAIL PROTECTED] server=someserver port=25 subject=Updated replyto=[EMAIL PROTECTED] failto=[EMAIL PROTECTED] html head titleJob Updated/Completed/title style type=text/css a.input_txt { font-family: Arial, Verdana, sans-serif; font-size: 12px; color: ##00; font-weight: normal; background-color:##bb; } a.input_txt:hover { font-family: Arial, Verdana, sans-serif; font-size: 12px; color: ##00; font-weight: normal; background-color:##bb; } a.input_txt:visited { font-family: Arial, Verdana, sans-serif; font-size: 12px; color: ##00; font-weight: normal; background-color:##bb; } /style /head body bgcolor=##FF div style=width:100%; height:100%; background-color:##FF; align=center div style=background-image:url('#request.webRoot#Images/#bground#'); background-repeat:no-repeat; width:743px; height:460px; background-color:##FF; position:relative; align=left div style=position:relative; left:25px; top:120px; width:690px; height:245px; form id=emailFrm table width=100% height=100% cellpadding=0 cellspacing=0 border=0 tr class=label td Ref:nbsp;nbsp;input id=Ref name=Ref readonly=1 type=text style=width:90px; border-style:none; background-color:##cbcecb; value=#form.hidjnumber# /td /tr tr class=label td colspan=2 valign=bottom Comments /td /tr tr td colspan=2 valign=middle textarea id=lastComment name=lastComment readonly style=width:680px; height:165px; class=input_txt#form.Comment#/textarea /td /tr /table /form /div /div /div /body /html /cfmail Its the code with the url to the image that causes the problem div style=background-image:url('#request.webRoot#Images/#bground#'); background-repeat:no-repeat; width:743px; height:460px; background-color:##FF; position:relative; align=left I was wondering if anybody else has had this problem and how did you go about fixing it. I'll really apprecaite your help Best regards cfcoder ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199325 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: embedding an image in cfmail
another thing I forgot to mention, when I run the image on the browser, I don't get prompted to enter the username and password. http://gateway/pages/Images/jobupdated.gif The security settings on the images folder is set to Full Control ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199327 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: embedding an image in cfmail
thanks Jedi for your reply. How do I go about embeding it. And the cid where can I generate this? I'm sorry I don't have any past experience in it Regards cfcoder ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199329 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: embedding an image in cfmail
I get an error when I run that code Attribute validation error for tag CFMAILPARAM. The tag does not allow the attribute(s) CONTENTID. The valid attribute(s) are FILE,NAME,TYPE,VALUE. This is the cfmx version I have installed on the server Version 6,1,0,hf52806_61 Any thoughts? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199336 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: embedding an image in cfmail
Just looked up the cfmailparam tag in the coldfusion 6.1 online documentation. CONTENTID attribute is not part of the tag. It is however included in CFMX 7 http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-pb2.htm#wp1101294 http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentationfile=part_cfm.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199338 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: embedding an image in cfmail
thanks for this. I'll do this on Monday as I have to wait for clearance. Regards cfcoder ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199346 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: format y-axis in cfchart
Hi again, I'm just so loosing my focus here. Not knowing how this things works is probably what's getting me all frustrated. Ok, here is what my query looks like cfquery name=qBar datasource=testDB SELECT CONVERT(varchar(15), dt.dtlogged, 106) AS dtlogged, dt.jobcount, j.jobPriority, j.jobNumber FROM ( SELECT CAST(CONVERT(varchar(15), logdatetime, 106) AS datetime) AS dtlogged, COUNT(*) AS jobcount FROM job WHERE logdatetime = '01/02/2005 00:00:00' AND logdatetime = '02/02/2005 23:59:59' GROUP BY CAST(CONVERT(varchar(15), logdatetime, 106) AS datetime) ) dt JOIN job j ON dt.dtlogged = CAST(CONVERT(varchar(15), j.logdatetime, 106) AS datetime) ORDER BY dtLogged /cfquery And when I dump it, it looks something like this: query CALLCOUNT JOBNUMBER JOBPRIORITY DTLOGGED 1 2 01BS093789 2 01 Feb 2005 2 2 01BS093795 3 01 Feb 2005 3 3 01BS093872 6 02 Feb 2005 4 3 01BS093883 6 02 Feb 2005 5 3 01BS093888 1 02 Feb 2005 I hope it is making sense so far. I now what to build a chart with the date on the x-axis and the no of jobs logged in a day on the y-axis. In the example above, there are 2 jobs logged on the 1st of Feb each with a different jobPriority. I want the the user to be able to see this in the chart which is why I've added the cfif block inside the chartseries tag, but becuase the cfif is inside the chartseries tag and not outside, the chart representation of the data is not right. I don't know the right way to do this. Can you please help Regards cfcoder ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198927 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfchart and cfchartdata question. Kindly help!
I'm afraid that does not return the results I want to see returned. I am building a graph with the dates displayed on the x-axis and the count of jobs logged in a day dispalyed on the y-axis. If there are 3 jobs logged in a day, each job has a different jobPriority, I want to build a chart looking at which you can tell that on certain day there were for ex 3 jobs logged with the 3 priorities stacked on top of each other. I hope its making sense. Thanks for your help so far Regards cfcoder ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198782 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
format y-axis in cfchart
The values displayed on the y-axis are are mix of float and int. The chart displays int values on the y-axis if I use only one cfchartseries tag. The code below calculates the value for the gridlines and scaleto attributes. [code] cfset scTo=evaluate(ArrayMax(ListToArray(valuelist(qJobsLogged.JOBSCOUNT)))+1) [/code] When I output this variable, the value returned is 88 and when I execute the below code I get the following on the y-axis: 6 ,18, 30, 42, 54, 66, 78 [code] cfchart show3d=yes gridlines=#evaluate(scTo+1)# yaxistype=scale labelformat=number scalefrom=0 scaleto=#scTo# format=jpg xAxisTitle=log date yAxisTitle=jobs logged chartheight=300 chartwidth=450 sortxaxis=no showborder=yes showxgridlines=yes showygridlines=yes seriesplacement=stacked font=Arial fontsize=12 fontbold=yes cfchartseries type=bar serieslabel=Critical query=qJobsLogged itemcolumn=DTLOGGED valuecolumn=JOBSCOUNT cfif qJobsLogged.jobPriority eq 1 cfchartdata item=#qJobsLogged.DTLOGGED# value=#qJobsLogged.JOBCOUNT# /cfif /cfchartseries /cfchart [/code] However, when I add 3 more chartseries tag to the above code, I get 27.7, 83, 138.4, 193.8, 249.1, 304.5 [code] cfset scTo=evaluate(ArrayMax(ListToArray(valuelist(qJobsLogged.JOBCOUNT)))+1) cfchart show3d=yes gridlines=#evaluate(scTo+1)# yaxistype=scale labelformat=number scalefrom=0 scaleto=#scTo# format=jpg xAxisTitle=log date yAxisTitle=jobs logged chartheight=300 chartwidth=450 sortxaxis=no showborder=yes showxgridlines=yes showygridlines=yes seriesplacement=stacked font=Arial fontsize=12 fontbold=yes cfchartseries type=bar serieslabel=Critical query=qJobsLogged itemcolumn=DTLOGGED valuecolumn=JOBSCOUNT cfif qJobsLogged.jobPriority eq 1 cfchartdata item=#qJobsLogged.DTLOGGED# value=#qJobsLogged.JOBCOUNT# /cfif /cfchartseries cfchartseries type=bar serieslabel=Urgent query=qJobsLogged itemcolumn=DTLOGGED valuecolumn=JOBCOUNT cfif qJobsLogged.jobPriority eq 2 cfchartdata item=#qJobsLogged.DTLOGGED# value=#qJobsLogged.JOBCOUNT# /cfif /cfchartseries cfchartseries type=bar serieslabel=Normal query=qJobsLogged itemcolumn=DTLOGGED valuecolumn=JOBCOUNT cfif qJobsLogged.jobPriority eq 3 cfchartdata item=#qJobsLogged.DTLOGGED# value=#qJobsLogged.JOBCOUNT# /cfif /cfchartseries cfchartseries type=bar serieslabel=Other query=qJobsLogged itemcolumn=DTLOGGED valuecolumn=JOBCOUNT cfif qJobsLogged.jobPriority gt 3 cfchartdata item=#qJobsLogged.DTLOGGED# value=#qJobsLogged.JOBCOUNT# /cfif /cfchartseries /cfchart [/code] Can any mathematician help please Regards cfcoder ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198820 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
cfchart and cfchartdata question. Kindly help!
Hello everybody, I really need someone to help me here. I'm new to charting. I'm developing a graphical interface to report the no of jobs logged in a period. The x axis displays the period (days) and the y-axis displays the number of jobs logged in a given day. The data is pulled from the jobs table. The job logged date value is stored in the logdateTime column. I've written a stored procedure to get the count of jobs logged in a given day. Here is the code. cfquery name=qJobsLogged datasource=dbname EXEC countJobsLogged @startdatedate = '2005/02/01', @stopdate = '2005/02/28' /cfquery !-- sp code starts here -- CREATE proc countJobsLogged @startdate datetime, @stopdate datetime as set nocount on declare @x datetime, @count int create table #temp_report( dtlogged varchar(15), jobsCount int ) select @x = @startdate while @x = @stopdate begin select @count = isnull(count(1),0) from call where logdatetime = @x + '00:00:00' and logdatetime = @x + '23:59:59' insert into #temp_report values(convert(varchar(15),@x,106), @count) select @x = dateadd(d, 1, @x) end select * from #temp_report drop table #temp_report set nocount off GO !-- sp code ends here -- The above sp loops from the user selected start date to the user selected end date and returns a resultset showing the no of jobs logged. Ex JOBSCOUNT DTLOGGED 10 01 Feb 2005 20 02 Feb 2005 30 03 Feb 2005 Here is how I'm building the chart cfset scTo=evaluate(ArrayMax(ListToArray(valuelist(qJobsLogged.jobsCount)))+1) cfchart show3d=yes gridlines=#evaluate(scTo+1)# labelformat=number scalefrom=0 scaleto=#scTo# format=jpg xAxisTitle=log date yAxisTitle=jobs logged chartheight=300 chartwidth=450 showxgridlines=yes showygridlines=yes seriesplacement=default cfchartseries type=bar serieslabel=Jobs Logged cfloop query=qJobsLogged cfchartdata item=#qJobsLogged.DTLOGGED# value=#qJobsLogged.jobsCount# /cfloop /cfchartseries /cfchart The above code builds the graph with the data returned by the query. So far, so good. I want each data point in the bar chart to give me a break-down of urgent jobs, critical jobs, normal jobs and jobs fixed on time. I guess what I'm trying to say is take the results returned from the sp above and instead of just displaying a bar chart showing the count of jobs logged in day, I want the chart to show me the urgent, critical, normal jobs for a particular day. I really hope this is making sense. The job priority information is in the jobPriority column in the job table. Job Priorities Urgent - 5 Critical - 4 Normal - 3 Ex: Jobs logged on 01 Feb 2005 - 10. Urgent jobs - 4, Critical jobs - 4, Normal Jobs - 2 Can somebody show me the sql to get this information and the code to build the chart I would really appreciate your help Best regards cfcoder ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198632 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfchart and cfchartdata question. Kindly help!
thanks Cliff for the reply. That did occur to me and its probably the only way to do it. However, I don't know how to build the select sql query. From what I understand when using the count() function, I can't any other column name in the select. select count(*), jobPriority from call where logdatetime = @x + '00:00:00' and logdatetime = @x + '23:59:59' How do I get the query to return the count of jobs logged in a day and for each job return the jobPriority. Is there a way to do this? Regards, cfcoder ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198644 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
sql select statement help..
Hello everybody, I really need someone to help me here. I'm developing a graphical interface to report the no of jobs logged in a period. The x axis displays the period (days) and the y-axis displays the number of jobs logged in a given day. The data is pulled from the jobs table. The job logged date value is stored in the logdateTime column. I've written a stored procedure to get the count of jobs logged in a given day. Here is the code. cfquery name=qJobsLogged datasource=dbname EXEC countJobsLogged @startdatedate = '2005/02/01', @stopdate = '2005/02/28' /cfquery !-- sp code starts here -- CREATE proc countJobsLogged @startdate datetime, @stopdate datetime as set nocount on declare @x datetime, @count int create table #temp_report( dtlogged varchar(15), jobsCount int ) select @x = @startdate while @x = @stopdate begin select @count = isnull(count(1),0) from jobs where logdatetime = @x + '00:00:00' and logdatetime = @x + '23:59:59' insert into #temp_report values(convert(varchar(15),@x,106), @count) select @x = dateadd(d, 1, @x) end select * from #temp_report drop table #temp_report set nocount off GO !-- sp code ends here -- The above sp loops from the user selected start date to the user selected end date and returns a recordset showing the no of jobs logged. Ex JOBSCOUNT DTLOGGED 2 01 Feb 2005 3 02 Feb 2005 4 03 Feb 2005 So far so good. I want to modify the select stmt in that I want it to also return the jobPriority and the jobNumber (these are columns in the job table) for jobs that it found logged on a particular day. So for example if say for ex, there are 2 jobs logged on the 01 Feb 2005, I want the final recordset to look something like this JOBSCOUNT DTLOGGEDjobPriority jobNumber 2 01 Feb 2005 3 01JS1003 2 01 Feb 2005 2 01JS1004 3 02 Feb 2005 4 01JS1005 3 02 Feb 2005 4 01JS1006 3 02 Feb 2005 5 01JS1016 4 03 Feb 2005 1 01JS1018 4 03 Feb 2005 2 01JS1020 4 03 Feb 2005 3 01JS1021 4 03 Feb 2005 4 01JS1022 I was hoping someone could show me the sql to achieve this result Best regards cfcoder ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198649 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFChart: Set Axis Markers?
I would really appreciate it if someone showed me how to do this. I'm building a bar chart which displays the no of jobs logged in a month. Here is my code cfchart show3d=yes gridlines=5 labelformat=number scalefrom=0 scaleto=10 format=jpg xAxisTitle=log date yAxisTitle=jobs logged chartheight=300 chartwidth=450 sortxaxis=no showborder=yes showxgridlines=yes showygridlines=yes seriesplacement=default font=Arial fontsize=12 fontbold=yes cfchartseries type=bar serieslabel=jobs Logged cfloop query=qJobsLogged cfchartdata item=#qJobsLogged.DTLOGGED# value=#qJobsLogged.CALLCOUNT# /cfloop /cfchartseries /cfchart The values displayed in the y-axis are of type float. I want them to be numeric. Any help would be greatly appreciated Best regards, cfcoder ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198236 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
ColdFusion ignores empty list elements
ex: the list a,b,c,,,d has four elements How do I force it to not ignore empty elements? I'm getting an error with listGetAt(list,4). Any thoughts? Best regards cfcoder ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197650 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: ColdFusion ignores empty list elements
thanks for that guys. I'm still getting an invalid list index error. if the list has 4 elements and I try to use the listgetat function to get the 5th element. I get an error. QuerySetCell(qTmp,model, listGetAt(list,5)); Is there a way to say if it does not exist, do something else ex: cfscript if (listGetAt(list,5)) { QuerySetCell(qTmp,model, listGetAt(list,5)); } else{ QuerySetCell(qTmp,model,); } /cfscript The above code does not work though ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197654 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: ColdFusion ignores empty list elements
Here is the code cffile action=read file=#serverFileName# addnewline=yes variable=fileOutput cfset qTmp = QueryNew(ref,asset,serial,manufact,model) cfset fileOutput = Replace(fileOutput, ,,All) cfset fileOutputNew = Replace(fileOutput, ,,All) cfloop list=#fileOutput# index=fileLine delimiters=#Chr(13)# cfset tmp = QueryAddRow(qTmp,1) cfscript QuerySetCell(qTmp,ref, Replace(listGetAt(fileLine,1),,,All)); QuerySetCell(qTmp,asset, Replace(listGetAt(fileLine,2),,,All)); QuerySetCell(qTmp,serial, Replace(listGetAt(fileLine,3),,,All)); QuerySetCell(qTmp,manufact, Replace(listGetAt(fileLine,4),,,All)); QuerySetCell(qTmp,model, Replace(listGetAt(fileLine,5),,,All)); /cfscript cfquery name=getQuery dbtype=query SELECT * FROM qTmp /cfquery /cfloop Hope this helps ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197660 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SQL Select statment query - kindly help
so you're saying give me any job where eventCode is 100 and jobID is N, but where the same job doesn't have an eventCode of 150 somewhere else That was exactly what I was trying to acheive. You sql worked straight away. Thank you again for your reply. Best regards coder ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195352 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
SQL Select statment query - kindly help
Hello everybody, I have a question with regards to a sql select statement and was hoping someone could help. I'm trying to query a table and trying to return row where a condition is true. To give you a better idea; picture a event table. A job can have muliple events ex, an event to indicate the job is logged, an event to indicate the job is closed, an event to indicate the job is open etc etc. Each job has a unique job id that is stored in the job table and the job_id column is also present in the event table (foreign key I suppose) I'm trying to run a query that returns a recordset if it has an event present in the event table but also if another event is missing from that table for a particular job This will give you a better idea SELECT EventCode FROM job INNER JOIN Event ON Event.job_id = job.job_id WHERE (EventCode = 100) AND EventCode 150 AND (job_id = '1234567890') The above select statement returns a recordset if the event code 150 is present in the event table. But I want it to only return a recordset if the table contains the eventcode 100 and does not contain the eventcode 150. Can somebody show me how to do this please Best regards coder ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195206 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problems Querying Text File Datasource Using ODBC/Coldfusion MX
Hi Jared, Thanks for responding (I work with cfcoder btw). You're right; we don't have to do it this way, but it fitted in nicely with some other stuff, and being stubborn and not liking to admit defeat, we'd been wanting to get this to work. In the end though, even if it does work we'll still need to employ other methods as the driver only supports SELECT INSERT, ie no support for UPDATE DELETE, which we obviously need on a user admin page. As for your second point, yes, the file is being created by a php web app that we have no control over, and even if we knew any php, is encrypted anyway! Mind you, we have ordered a text book! ;o) For the time being, we've used CFFILE to copy and rename the file, we'll do our work on it, and then use it to copy over the original. Clunky I know - the original app developers have advised that a SQL backed version will be out hopefully this year, so with a bit of luck this is only a stop gap until then. Regards, Mat ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:194074 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Problems Querying Text File Datasource Using ODBC/Coldfusion MX
Hi, Just wondering if anyone has experience with using the Microsoft Text ODBC Driver with Coldfusion? The problem I am getting is that the datasource I have to work with is named account.dat.cgi. I have set up a System DSN on the server for the folder containing this file, and configured it so that the ODBC manager finds all the columns and have set all the datatypes. All looks fine. I should note that when I originally did this I got an error, as detailed in this MS Support article: http://support.microsoft.com/?id=304206 I took the third option they detail, namely to add both dat and cgi to the registry entry - and this cured the problem. Next I added the ODBC DSN into the ColdFusion datasources. However, when I wrote a short CF script to query this datasource, I got the below error: Error Executing Database Query. [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Text Driver] The Microsoft Jet database engine could not find the object apos;account.dat.cgiapos;. Make sure the object exists and that you spell its name and the path name correctly. The error occurred in E:\inetpub\wwwroot\artman_dev\Coldfusion\admin.cfm: line 21 19 : cfquery name=getAccount datasource=articleManager 20 : select * from account.dat.cgi 21 : where LCASE(USERLOGINID) = 'cfoutput#LCASE(session.user.username)#/cfoutput' 22 : /cfquery The first thing I suspected was that ColdFusion hasn't allowed me to query the .dat or .cgi file types despite the setup in the ODBC. To that end I made a duplicate of account.dat.cgi and renamed it account.txt. After updating my script to query the new file, everything worked fine. So, does anyone know of a way I can get ColdFusion to query the original file? Or perhaps a different method entirely? The file is used for the user account data for an application we use, and the application does not allow very good user account management, so I've been asked to write a couple of ColdFusion scripts that will allow users to create/modify/delete new accounts? Regards, cfcoder ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:193801 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Pattern matching in ASP - Kindly help
function GetCommentsWrapper(txt){ if(REFindNoCase((newLog|legacyLog)\b[^]*,txt)) return GetCommentsNew(txt); else return GetComments(txt); } I want to display everything between the opening newLog or legacyLog tag and the closing /newLog or /legacyLog tag. The above function works, but I'm trying to re-write the code in ASP. I tried this but it does not work ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=38 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182585 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Pattern matching in ASP - Kindly help
Hi guys, I'm really hoping someone could help me, this may not be the forum for this question but I thought I'll ask for your help anyway. I am a ColdFusion developer. I'm trying to re-write some CF code in ASP, and am stuck. To give you an overview, I'm working on a job logging system. The customer calls the helps desk to log a job, the help desk creates a new job, adds the comments to the log. The comment is wrapped around a userdefined tag in this format and saved in the database. ex: newLog username='cfcoder'span class='timestamp'cfcoder | 20/10/2004 16:34:12/spanbrnew test commentshr/newLog as you may have noticed, the comment (in this case: new test comments) is wrapped around the userdefined tag newlog The customer front-end is written in ASP. Currently if a customer views this job it displays the newlog tag and I want to add some asp, do some pattern matching to only display the comment. I would really appreciate if someone could show me how to re-write my code in ASP. I have attached my coldfusion code [CODE] cfscript function GetHeaders(header){ // regexp for timestamp var timestampRegexp = \d{1,2}/\d{1,2}/\d{4}\s+\d{1,2}:\d{1,2}:\d{1,2}; var stTmp = StructNew(); var stReturn = StructNew(); // remove *** if necessary header = REReplace(header,(^\s*[*]{3}\s*|\s*[*]{3}\s*$),,all); // find timestamp stTmp = REFind(timestampRegexp,header,1,true); if(stTmp.pos[1]){ // if there is a timestamp, the user is everything in the header but the timestamp // a header looks like this: CFCODER01 | 14/11/2003 14:18:56 // get the list of all usernames from the header for the log (one or more) stReturn.user = Trim(Removechars(header,stTmp.pos[1],stTmp.len[1])); // get the timestamp // get the list of all timestamps from the header for the log (one or more) stReturn.timestamp = REReplace(Mid(header,stTmp.pos[1],stTmp.len[1]),\s+, ); } else{ // if there is NO timestamp, the user is everything in the stReturn.user = Trim(header); // create a fake timestamp for normalization stReturn.timestamp = 00/00/ 00:00:00; } // remove trailing pipe from user if necessary stReturn.user = REReplace(stReturn.user,\s*\|$,); // remove log tags stReturn.user = REReplaceNoCase(stReturn.user,/?(new|legacy)Log\b.*?,,all); // determine log type stReturn.log = legacyLog; if(FindNoCase(newLog,header)) stReturn.log = newLog; return stReturn; } function FormatComment(stComment){ var oldchars = ,,; var newchars = lt;,gt;,quot;; return '#stComment.log# userName=#stComment.user#span class=timestamp#stComment.user# | #stComment.timestamp#/spanbrpre style=font-family:Arial, Verdana;#ReplaceList(stComment.text,oldchars,newchars)#/prehr/#stComment.log#'; } function GetComments(str){ var start = 1; var cnt = 0; var i = 0; var stComments = StructNew(); var bComments = true; var stTmp = StructNew(); /* regular expression for header: line surrounded with *** OR line ending with (?m) multi-line mode - matches before and after newlines (^ start of line instead of start of string) ($ end of line instead of end of string) ^start of line [ \t]*any number of spaces or tabs (start group (for OR) [*]{3}three stars [^\n]*?Any characters except new line any number of times (non greedy operator *?) [*]{3}three stars |OR [^\n]*?Any characters except new line any number of times \d{1,2}1-2 digits // \d{1,2}1-2 digits // \d{4}4 digits [ \t]+one or more spaces or tabs \d{1,2}1-2 digits :: \d{1,2}1-2 digits :: \d{1,2}1-2 digits )end group [ \t]*any number of spaces or tabs $ end of line */ var commentRegexp = (?m)^[ \t]*([*]{3}[^\n]*?[*]{3}|[^\n]*?\d{1,2}/\d{1,2}/\d{4}[ \t]+\d{1,2}:\d{1,2}:\d{1,2})[ \t]*$; /* Initialize structure The structure has 3 keys: 1. slug containing the slug 2. comments is an array of comments. each element in the array is a structure containing 4 keys: user: user from the header timestamp: timestamp from the header text: text of the comment comment: full formatted comment 3. formatted: the comments field with formatted headers */ stComments.comments = ArrayNew(1); stComments.slug = ; // normalize returns to newline character (chr(10)) str = REReplace(str,\r(\n),\1,all); // first get rid of redundant tags str = REReplaceNoCase(str,/?(span|pre|hr)\b.*?,,all); // convert br to newline str = REReplaceNoCase(str,br\b.*?,Chr(10),all); // GET THE SLUG // find first header stTmp = REFind(commentRegexp,str,start,true); if(stTmp.pos[1]){
Re: exception handling, kindly help
Can somebody please help? I don't know where to go from here. I'll really appreciate it ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=36 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181968 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: exception handling, kindly help
thanks for that... I'll give it a bash Regards cfcoder ~| Sams Teach Yourself Regular Expressions in 10 Minutes by Ben Forta http://www.houseoffusion.com/banners/view.cfm?bannerid=40 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181976 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: exception handling, kindly help
thanks Simon ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=37 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181977 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Select distinct record - help
Hello everybody, I was wondering if someone could help me. I am trying to get the distinct record from a select statment. Here is the code. cfquery name=getEmployeeDetails datasource=db select distinct reference, uniqueID, firstname, lastname FROM employee WHERE reference = 'cfcoder' ORDER BY reference asc /cfquery This brings back 2 records, and I want it to only return 1 row. select name=custname id=custname cfloop query=getEmployeeDetails option value=#reference##reference#/option /cfloop /select The data in the table looks like this 1 cfcoder cf coder 2 CFCODEr cf coder There are two rows in the table with the same reference. How do I get it to only display 1 record. Can somebody please help Regards cfcoder ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=37 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181978 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Select distinct record - help
Pascal, I was just trying to illustrate to you if it makes sense ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=37 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181992 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: exception handling, kindly help
Hi and thank you all for posting the code. I'm afraid I'm still stuck with this problem. My application uses a lot of iframes and the custom error message can have a green background or a orange background depending on the page the error occurred and to be able to do that I use the custom tag inside the cfcatch block and color is the one of the attributes of this tag. cfcatch type=any cf_caughtIt catchMessage=#cfcatch.message# color=red /cfcatch I still don't know how to call the cferror tag. To give you a better idea, here is what I'm trying to do Step 1: Exception occurred. error code wrapped around cftry and cfcatch blocks Step 2: custom tag caughtIt called inside the cfcatch tag, see above. Step 3: caughtIt.cfm displays the custom error message and emails the error details to the administrator i.e form, session, url info. I'm trying to get detailed error info (ie line error occurred, root cause, diagnostics etc. This info is contained in the error structure that is returned by the cferror tag. Now then, if I can somehow call the cferror tag inside application.cfm or some other way I can get something out. The problem is (I don't know how serious this is), but my application uses iframes. If the error occured in an inner iframe, how do I get to display the error message in that iframe and not on the top-level iframe? You see what I'm saying. I hope I'm making sense guys. I'll appreciate your help Regards cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: exception handling, kindly help
Hi and thank you all for posting the code. I'm afraid I'm still stuck with this problem. My application uses a lot of iframes and the custom error message can have a green background or a orange background depending on the page the error occurred and to be able to do that I use the custom tag inside the cfcatch block and color is the one of the attributes of this tag. cfcatch type=any cf_caughtIt catchMessage=#cfcatch.message# color=red /cfcatch I still don't know how to call the cferror tag. To give you a better idea, here is what I'm trying to do Step 1: Exception occurred. error code wrapped around cftry and cfcatch blocks Step 2: custom tag caughtIt called inside the cfcatch tag, see above. Step 3: caughtIt.cfm displays the custom error message and emails the error details to the administrator i.e form, session, url info. I'm trying to get detailed error info (ie line error occurred, root cause, diagnostics etc. This info is contained in the error structure that is returned by the cferror tag. Now then, if I can somehow call the cferror tag inside application.cfm or some other way I can get something out. The problem is (I don't know how serious this is), but my application uses iframes. If the error occured in an inner iframe, how do I get to display the error message in that iframe and not on the top-level iframe? You see what I'm saying. I hope I'm making sense guys. I'll appreciate your help Regards cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: exception handling, kindly help
Thank you guys for replying to my thread. Ewok I tried your code, but still don't get back a empty error structure cftry cfcatch type=any cfdump var=#error# !--- I want to see what is returned in this structure --- cfabort cf_caughtIt catchMessage=#cfcatch.message# /cfcatch /cftry [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: exception handling, kindly help
I'm sorry I made a typo mistake in my last post. What I meant was that the error structure is empty when I try to dump it [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: exception handling, kindly help
Hi there, sorry for not getting back sooner. I've been banging my head trying to find a solution ALL day. I would really appreciate your help. I have added the custom error message in the error handler file. cfcatch type=any cf_caughtIt catchMessage=#cfcatch.message# /cfcatch I modified caughtIT.cfm a bit. It now contains the custom error message. What I also want to do in the background now is send the email to the administrator with the complete error information. Here is the code: cfparam name=attributes.catchMessage default=application error table tr td Oops! an error has occurred /td /tr /table I hope I'm making sense? I want to now add the cfmail tag either on this page or in another custom tag just below the code above that has the detailed error info in the email body. Can you please please show me how to do this man! I would be so thankful to anybody who does. CatchIT.cfm is a error template. I beleive I should be using the cferror tag, I don't know how to use this. This is what I want to output in the email CFMAIL type=HTML FROM=[EMAIL PROTECTED] TO=#administrator# SERVER=someserver PORT=25 SUBJECT=#cgi.SCRIPT_NAME# h2Error/h2 cfif isdefined(Error) cfdump var=#error# cfelse No Error info defined /cfif h2Details/h2 cfif attributes.catchMessage neq cfdump var=#attributes.catchMessage# /cfif h2Form Info/h2 cfdump var=#form# h2URL Details/h2 cfdump var=#url# /CFMAIL I would really apprecaite your help Regards cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: exception handling, kindly help
thanks Mark, the cfcatch tags are wrapped inside a cftry block, I didn't post it because I thought it wasn't necessary. And secondly the cfcatch tag is not in the error handler page, its on a file where the error has occurred. cfdump var=#error# throws an error and that's because as Pascal pointed out, struct error is avaialbe in the cferror tag. But thanks for your reply, I appreciate it cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: exception handling, kindly help
do you know as to why it would throw a COM object error? If so do you know if there is a fix? I have seen instances where this variable is empty.I believe it was related to a COM object error.I could be wrong about the exact variable that didn't exist, but I remember that a cfcatch variable was empty when I did not expect it to be. From: Dave Carabetta [mailto:[EMAIL PROTECTED] Sent: Thursday, October 07, 2004 11:57 AM To: CF-Talk Subject: Re: exception handling, kindly help On Thu, 07 Oct 2004 12:53:56 -0400, cf coder [EMAIL PROTECTED] wrote: cfcatch.details returns nothing. Does it depend on the type of exception I select? It should be cfcatch.detail. Regards, Dave [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
exception handling, kindly help
Hello everybody, I'm hoping someone can help me. I am working on this exception handling code. I have written a custom error handler that displays a custom error message when a coldfusion error occurs and sends an email to the administrator. I want to append the complete error block to the email body. i.e essentially the raw error message you would see if you didn't have the cftry and cfcatch. ex: Error Occurred While Processing Request Variable NAME is undefined. The error occurred in c:\inetpub\wwwroot\Dev\details.cfm: line 494 Called from c:\inetpub\wwwroot\Dev\details.cfm: line 457 Called from c:\inetpub\wwwroot\Dev\details.cfm: line 226 Called from c:\inetpub\wwwroot\Dev\details.cfm: line 1 492 : /cfif 493 : , '#LSDateFormat(Now(),'/mm/dd')# #LSTimeFormat(Now(),'HH:mm:ss')#', 494 : '#Name#' 495 : ) 496 :/cfquery Here is my code: cftry cfcatch type=any cf_caughtIt catchMessage=#cfcatch.message# /cfcatch /cftry caughtIt.cfm cfparam name=attributes.catchMessage default= CFMAIL type=HTML FROM=[EMAIL PROTECTED] TO=#administrator# SERVER=someserver PORT=25 SUBJECT=#cgi.SCRIPT_NAME# h2Details/h2 cfif attributes.catchMessage neq cfdump var=#attributes.catchMessage# /cfif h2Form Info/h2 cfdump var=#form# h2URL Details/h2 cfdump var=#url# /CFMAIL I would appreciate your help Regards, cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: exception handling, kindly help
cfcatch.details returns nothing. Does it depend on the type of exception I select? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
How do I close the pop-up window - kindly help
Hi Guys, I'm hoping someone can help me. I've tried everything but can't quiet nail this problem. I have this page that has a hyper-link. Clicking on the hyper-link opens up a pop-up window. The url looks something like this: window.open('attachment.cfm?promptUser=trueid=12345filename=testfile', 'Attachment', 'top=10,left=10,height=315,width=600,resizable=Yes,scrollbars=Yes'); You may have noticed I'm passing a url variable 'promptUser' with a default value of 'true'. Here is the code in the pop-up window. script language=_javascript_ function openAttachment(){ window.location = cfoutput#cgi.SCRIPT_NAME#?FILENAME=#url.FILENAME#ID=#url.id#promptUser=false/cfoutput; } function cancelAttachment(){ window.close(); } /script !--- if the url variable promptUser is true, display few instructions to help the user to decide what he must be doing --- cfif isDefined(url.promptUser) and promptUser eq true table width=100% border=0 cellspacing=0 cellpadding=5 tr td If you intend to modify an existing attachment, you must follow the below steps: br blah blah blah /td /tr tr td valign=top align=center img src="" id=okbutt name=okbutt border=0 alt=open attachment > br /td td valign=top align=center img src="" id=cancelbutt name=cancelbutt border=0 alt=close > br /td /tr /table !--- if it is false, just open the attachment in its own application --- cfelseif url.promptUser eq false cfset fName = url.filename !--- Generates custom HTTP response headers to return to the client. --- CFHEADER NAME=Content-Type VALUE=application/unknown CFHEADER NAME=Content-Disposition VALUE=attachment; filename=#fName# CFCONTENT TYPE=application/unknown FILE=UploadFolder\#fName# deletefile=no /cfif I hope the above code is self-explainatory. If you notice, I'm setting 'promptUser' url variable to 'false' in the 'openAttachment' function. This opens up the file open/save dialog box. Now then, this is where I'm stuck. I want to close the pop-up window when the 'promptUser' value is 'false', in other words when the user clicks on the 'okbutt' button. Can someone show me how to do this. I would really appreciate your help Best regards, cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: How do I close the pop-up window - kindly help
thanks Pascal. I went with the second option: function openAttachment(){ opener.location = cfoutput#cgi.SCRIPT_NAME#?FILENAME=#url.FILENAME#ID=#url.id#promptU ser=false/cfoutput; window.close(); } It works just fine, many thanks Pascal, you are a genius Regards, cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
datetime problems - 01/01/1900
Hello, I'm assuming this one should be an easy one.I'm running an insert query and one of the fields is date/time. When I DO NOT send a value to it, I want to insert is as NULL, but instead, it's going in as 1/1/1900. How should I do my query where I can send a NULL Value? Thanks, cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: datetime problems - 01/01/1900
The table column allows null values. Hey Pascal, hope you're doing well mate! I copied your code. I am checking for some condition; if it is false, I want to insert null in the datetime column. ActionDateTime = cfqueryparam cfsqltype=cf_sql_timestamp value= null=#YesNoFormat(0)# I get an error when I submit the form Error Occurred While Processing Request The cause of this output exception was that: java.lang.NullPointerException. Any ideas? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]