ctreeves
Explorer
ctreeves
Explorer
Activity
Feb 24, 2025
06:54 PM
I suppose I could have been more helpful. 🙂 MariaDB 10.6.21 Coldfusion info #server.coldfusion.appserver# Tomcat #server.coldfusion.productlevel# Enterprise #server.coldfusion.productname# ColdFusion Server #server.coldfusion.productversion# 2023,0,11,330706 #server.os.name # Windows Server 2012 R2 #server.os.version# 6.3 I am imaging two variable, one for the start time and one for "now". That way each time the widget loads it shows the count of the posts. It does not need to be perfect or exact, it's a cycling forum, this is just something we've had for years and a recent update did away with the old widget and author of that widget. cfset - start_time = one second after midnight cfest - end_time Now For the query cfselect pid (int(10)) from forums_posts where post_date (int(10)) between #start_time# and #end_time# post_date is a unix timestamp - that's the part I really need help with, along with how to get the one second after midnight variable. Then I'll just output a record count of the query. I don't think it matters, but the forums_posts table has a couple million rows. Thank you
... View more
Feb 24, 2025
02:29 PM
I have a table with UNIX timestamps. I’d like to get a count of events for “today”. So I’d like the query to find any event between 1 second after midnight and now. I’m using this on a forum to see if we reached our goal number of posts per day. Before I reinvent the wheel in a very painful 🙂 (for me) and sloppy way, I wanted to see if you professionals had any advice. Please keep in mind, I am not a programmer. Thank you!
... View more
Jan 14, 2020
08:25 AM
Is it correct now? I unmarked my selection, I guess you solved so many issues I got a little silly. 🙂 Again, thank you
... View more
Jan 14, 2020
07:40 AM
I added localUrl="true" to both reports and the image displays correctly on the first report and the red x's in the checkboxes wente away. Thank you!
... View more
Jan 13, 2020
06:53 AM
OK, I seem to be having other issues. Could it be related to the security certificate too? The image below is from a PDF I generate, the red x's are checkboxes. They all load red in https, but function correctly (checked if indicated) using http. On another report an image on the server that is embedded also shows up as a red x unless I pull the report through http.
... View more
Jan 13, 2020
06:30 AM
I was not logging if it ran, simply relying on the output in the CF Administrator Scheduled Tasks list. This is an old site, most of the tasks were set up years ago. It's an intranet in a very locked-down environment, so I don't worry much about security. Many of the tasks are very old and had http URLs, I just updated all of the others. This one was very noticeable because the task was logging people out of a page they abandoned and others were not able to get in, it's a one user at a time page. Thanks again.
... View more
Jan 13, 2020
05:57 AM
Nevermind, Charlie solved it. Thanks Charlie! https://community.adobe.com/t5/coldfusion/coldfusion-10-scheduled-task/td-p/9978004 Our certificate was updated around the same time the problem started. I changed it to http, it ran.
... View more
Jan 13, 2020
05:54 AM
I've had a scheduled task running every minute since last June, it's run fine. Recently it stopped running. I have a lot of other scheduled tasks that are still running fine. If I visit the page I want the task to visit, it runs fine. The task Last Run column claims it ran. If I click the Run Scheduled Task button I get the success message, but it doesn't seem to be going to the page to trigger the event I need it to. I'm on CF10. Any thought on why this would happen? Thanks
... View more
Jan 06, 2020
11:33 AM
So let me see if I follow this. The original "question" was #, and world-class CF experts gave astounding responses? 🙂
... View more
Jun 24, 2019
08:01 AM
Thank you Dave, that won't work then. The form page has set fields for each row, but the numbers of rows are dynamic. The update loops through the form when submitted.
... View more
Jun 24, 2019
04:56 AM
Thank you all. Charlie, sorry for the use of the work LOCK, you are correct, I am blocking other users. This is an intranet for our department. There might be 3 or 4 users at the most on this page at the same time. What I have done is, when a user first visits that page, a query is made to a table I created that stores the user ID. If another user is currently using the page, the forms Submit button will not display, instead they will see a message that another user is currently using the page. I have a scheduled task that will reset that user to 0 just over every 3 minutes, that way if a user simply closes the page, it is not left assigned to them. What I planned to do was redirect the person on the page after three minutes of inactivity to the home page. If I redirect them first to the action page, will it submit their data? That would be perfect. I understand this is not an elegant solution, but as a non-programmer, many of my solutions are not elegant. Thank you
... View more
Jun 21, 2019
12:23 PM
I have a form that many people share. If more than one person uses it, their data is overwriting the next persons. I am working on a new page that will lock all other users from being able to submit data if another person is "logged" on to the page. The logged in user will get kicked out after three minutes of inactivity. The concern is, you may update several of the fields, get interrupted by a phone call, then get redirected to the home page and lose your data. If I have it redirect to the submission / processing page, will it take the form data with it, then I can send them to the home page? Please keep in mind, I am not a programmer, so I know there are likely many more elegant ways to resolve this. Thank you
... View more
Apr 02, 2018
12:05 PM
I'm sure it's something I did. I tried the option below. After I enter one character in the form (if typed manually) it submits. I need to be able to type or scan the unit number into the form, then when the TAB character is received, submit the form. WolfShade wrote You can even do it like so: <form id="testSubmit"><input type="text" id="testing" /></form> <script type="text/javascript"> var testSubmit = document.getElementById('testSubmit'), testing = document.getElementById('testing'); function submitIt(){testSubmit.submit();} function blurIt(){testing.blur();} testing.addEventListener('blur',submitIt); testing.addEventListener('input',blurIt); </script> V/r, ^ _ ^
... View more
Mar 30, 2018
02:43 PM
WolfShade, you are awesome, thank you, I will test it next week when I am back to work. Thank you!
... View more
Mar 30, 2018
12:40 PM
I have a form that we scan a single number into. The barcode scanner has an "Enter" built in to it after it scans. The problem is that these scanners are used for many other programs in our lab that all need a "Tab" and staff have to frequently switch them back and forth between tab and enter. My form is one simple field and a submit key, so scanning now captures the data and submits it. Can the form be set to submit when a "Tab" is sent? So it would be: scan data --> Tab = data submitted. Thanks
... View more
Jan 03, 2018
04:14 PM
I am by no means an expert, and you've certainly received expert help, but can I ask why you'd use cftextarea over something like ckeditor?
... View more
Jan 07, 2015
09:29 AM
Thanks Steve, I'm not worried about keeping the application safe or secure. Yes, I really said that. This is for our departments intranet, it's behind our firewall and only a few select people have access. I'd be curious to see what a regular expression would look like for this, I am always happy to learn, Thanks again.
... View more
Jan 06, 2015
06:31 AM
Thank you, this is perfect! I did get an error that want me to change "unit" to "Unit", other than that this is exactly what I needed!!!
... View more
Jan 05, 2015
09:54 AM
Sorry for the delayed reply, I've been off until now. Wow, I greatly appreciate this. I have not tested it yet, but presume (based on your reputation) it will work. ------- Update OK, so not being a JavaScript whiz, I am having trouble reading code / code... There are instructions that say code = ... and code.variable and you also named the field code. My field is named Unit. I tried updating everything that said code to unit, but that failed. I tried changing the field to code, but it's not working. I am using a cfform with a cfinput. I tried changing it to a regular input, still no luck. I'm sure the issues are all mine.
... View more
Dec 30, 2014
11:57 AM
I have a form field I want to control what a user can enter. It's for a blood product unit number. The format will always be: W1202 follow by the last 2 digits of the year 14 followed by 6 numbers 123456 Final entry W120214000001. That is what the unit number will look like - eye readable. The issue I have is that there is also a barcode and it's obviously easier for staff to enter it accurately if the scan it. The barcode has start (=) and stop (00) characters, so in this example it would look like =W12021400000100. Is there a way to detect if the first character is an = and strip it, preferably on the form? Then, if it is over 13 character and the last 2 character are 00, strip those as well? And while we are at it, make sure the unit number is a total of 13 consecutive characters? Your guidance is greatly appreciated.
... View more
Jun 20, 2014
07:47 AM
We have a blood donor database. We currently call all these people to remind them of their appointments. I want to start sending them emails instead. I thought it would be helpful if the e-mail had a link / image that said "Click here to add to your calendar". I see at least two concerns with that. First, I suspect the link data is different based on the type of calendar it may be added to. Second, I have no idea how to create such a link. The appointment date / time will be different for each donor. Suggestions on how to get started on this would be appreciated.
... View more
Jun 04, 2014
05:02 AM
Thank you, I submitted a bug. I may be able to migrate to CF10 in the next 6 months to a year, but this is disappointing for now. Maybe they'll fix my bug today? I appreciate your help!
... View more
Jun 03, 2014
10:44 AM
Thank you, I tried your code to see if I could reduce one file directly on the server as compared to while I am uploading it. The pdf is not protected and does have many images embedded. I get this error: An error occurred during OPTIMIZE operation in the cfpdf tag. Error: com.adobe.internal.pdftoolkit.core.exceptions.PDFCosParseException: Undefined filter - JPXDecode
... View more
May 28, 2014
07:55 AM
I am uploading pdf files to our server and want to save space. I am trying to use cfpdf to optimize the file size. The one I am testing on is 1.25MB, so it's not a big file. When I reduce it using desktop Acrobat it takes less than 1 second. When I use Coldfusion it times out after several minutes. The file is first uploaded to it's own directory, then I use this to try to reduce it. <cfpdf action = "optimize" source = "H:\Inetpub\Wwwroot\MySite.com\newsletters\files\#Section#\#issue#.pdf" algo = "bilinear" /> I'm sure it's something I've done wrong, please advise.
... View more
Feb 10, 2014
08:38 AM
I have a report I print tracking the number of events in different categories. Events are single items and never parts of items. The charts I am generating have the y axis divided in all different ways. Is there a way to force the y axis to be whole numbers? I'm using CF9. Thanks Examples
... View more
Jan 13, 2014
01:30 PM
BKBK wrote: Oh, and I hope you have saved the application file as Application.cfc, with capital A. Why is that, I'm on a Windows server, I thought they weren't case specific. I changed it anyhow.
... View more
Jan 13, 2014
01:28 PM
I changed it to this: <cffunction name="onApplicationStart" output="false" returntype="boolean"> and got this error: The value returned from the onApplicationStart function is not of type boolean.
... View more