Re:help with div's and form fields
Hi Steve, Can you please show me how to implement the first option. I really don't know anything about iframes. I would appreciate it Thanks CFDeveloper You have two options here... One, you can change the second DIV to an IFRAME and pass the variable in the first fields value to the IFRAME page which runs a query based off of that value and displays the results in the IFRAME form. The second method is to store the query for the second section in a WDDX packet and when the user enters the first value and clicks the button loop through the WDXX packet looking for the data. I can think of other methods as well. The advantage of step 1 is that the data is 100% accurate as of the time the button is clicked. In method 2 it is only as accurate as when the page was loaded initially. Optionally you could use a hidden frame and pass the value to it and then take the results and post them back to the caller form value as well. Steve -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 7:22 AM To: CF-Talk Subject: help with div's and form fields Hi Everybody, I really need a second opinion from someone on using DIV's. My page has a form with two div's, the first div, has two text fields and a button with a onClick event. When the user hits the button, the second div is displayed. Here's my code: html head titleDIV Example/title style .normal{position:absolute;top:100px;left:100px;display:inline;} .hidden{position:absolute;top:-200px;left:-200px;display:none;} /style script function pressedGo(){ if (document.getElementById(superDiv1).className == hidden){ document.getElementById(superDiv1).className = normal; document.getElementById(superDiv).className = hidden; } } /script /head body form name=frm method=post table width=100% border=0 tr td align=left div id=superDiv style=position:absolute; z-index:2; top: 50px; left: 5px; border: 1px none #00; class=normal table width=100% border=0 tr td align=left Enter user name input type=text name=userName or area input type=text name=area input type=button name=go value=go > /td /tr /table /div /td /tr tr td width=100% valign=top div id=superDiv1 style=position:absolute; z-index:2; top: 50px; left: 5px; border: 1px none #00; class=hidden table width=100% border=0 tr td align=left pinput type=text name=txtField1/p pinput type=text name=txtField2/p pinput type=text name=txtField3/p pinput type=text name=txtField4/p /td/tr/table /div /td /tr /table /form /body /html The code above is fairly st8forward, I hope. What I want it to actually do is pass the usename form field value from div 1 and pass the value to a query in div 2 and display the user details in the div 2 text fields without actually submitting the form. Is this possible? Is there any other way at all to do this sort of a thing? Many Thanks CF Developer __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ http://companion.yahoo.com/ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:help with div's and form fields
How do I pass the variable in the first fields value to the IFRAME page ? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:help with div's and form fields
many thanks Steve for this. It works! Am I right to say that only the embedded frame refreshes and not the entire page? The way I did it I just passed a URL var. If you defined a form on the second page you could also do something a bit more direct by writing directly to the form values on the Test2.cfm. You would need to add it to a FORM though as right now I didn't create a FORM for the text boxes but just placed them on the page. Steve -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 7:49 AM To: CF-Talk Subject: Re:help with div's and form fields How do I pass the variable in the first fields value to the IFRAME page ? _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:form variables not passed to action page - please help!
I'm assigning the form field values to hidden variables because it is a 4 pages form and I am passing the values from one page to another in hidden variables. I have chceked the code in both the action pages, they both have the same code, I just don't understand what's happenning here, I've turned debugging on. One another thing I've noticed is if I remove the id attribute from the text input fields, I get a _javascript_ error when submitting the form (form variable FirstName is not undefined). I thought the id attribute was optional. Any ideas? okay I copied your code and made a rental and order page. the page submits fine to either page depending on which button I press. One thing I dont understand is why you are assingning the values from a form field that is already being passed into a hidden field that is also passed? couldnt you do this in the js functions? function rentSubmit() { document.the_form.action = ""> document.the_form.submit(); } function orderSubmit() { document.the_form.action = ""> document.the_form.submit(); } but, either way it seems to be submitting fine. i guess you could check the syntax of your dump statement on the one page, and also turn debugging on to seethe form variables being passed. hope this helps. -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: Monday, November 03, 2003 10:06 AM To: CF-Talk Subject: form variables not passed to action page - please help! Hi Guys, Am really hoping for someone to help me. I have this problem and can't find a solution. I have a form with two buttons with an onClick event each. Each button calls a _javascript_ function. When the user clicks on the button, I'm assigning all form field values to hidden variables. When I dump the form values on the action page, I see the form field values (including hidden form field values) for button 1, but don't see the same when button 2 is clicked. Here is my code script LANGUAGE=_javascript_ function rentSubmit() { with (document.the_form) { FirstName_hid.value = FirstName.value; LastName_hid.value = LastName.value; } document.the_form.action = ""> document.the_form.submit(); } function orderSubmit() { with (document.the_form) { FirstName_hid.value = FirstName.value; LastName_hid.value = LastName.value; } document.the_form.action = ""> document.the_form.submit(); } /script form name=the_form method=post input type=text name=FirstName id=FirstName value= size=56br input type=text name=LastName id=LastName value= size=56 input type=hidden name=FirstName_hid value= input type=hidden name=LastName_hid value= input type=button name=Rent value=Rental Form > input type=button name=Order value=Order Form > /form When I click on the Rent button, I am taken to RentalForm.cfm. In this file, I have a cfdump var=#form# It dumps all the form variables as I expect it to. But when I click on the Order button, I get directed to OrderForm.cfm but the cfdump on that page displays nothing. I don't understand why I don't see the form variables? Can somebody show/tell me how to fix this problem. Many Thanks, Allan __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ http://launch.yahoo.com/promos/britneyspears/ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:form variables not passed to action page - please help!
One thing I forgot to mention in my previous post, I have CFMX developer edition on my local development server, both the action pages display the form variables, it all works. However I've got CFMX Standard edition on my server and it does not display the form variables when the order button is clicked. Does the server licence got anything to do with the problem I've having? I hope not. Both are Windows 2000 Machines I'm assigning the form field values to hidden variables because it is a 4 pages form and I am passing the values from one page to another in hidden variables. I have chceked the code in both the action pages, they both have the same code, I just don't understand what's happenning here, I've turned debugging on. One another thing I've noticed is if I remove the id attribute from the text input fields, I get a _javascript_ error when submitting the form (form variable FirstName is not undefined). I thought the id attribute was optional. Any ideas? okay I copied your code and made a rental and order page. the page submits fine to either page depending on which button I press. One thing I dont understand is why you are assingning the values from a form field that is already being passed into a hidden field that is also passed? couldnt you do this in the js functions? function rentSubmit() { document.the_form.action = ""> document.the_form.submit(); } function orderSubmit() { document.the_form.action = ""> document.the_form.submit(); } but, either way it seems to be submitting fine. i guess you could check the syntax of your dump statement on the one page, and also turn debugging on to seethe form variables being passed. hope this helps. -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: Monday, November 03, 2003 10:06 AM To: CF-Talk Subject: form variables not passed to action page - please help! Hi Guys, Am really hoping for someone to help me. I have this problem and can't find a solution. I have a form with two buttons with an onClick event each. Each button calls a _javascript_ function. When the user clicks on the button, I'm assigning all form field values to hidden variables. When I dump the form values on the action page, I see the form field values (including hidden form field values) for button 1, but don't see the same when button 2 is clicked. Here is my code script LANGUAGE=_javascript_ function rentSubmit() { with (document.the_form) { FirstName_hid.value = FirstName.value; LastName_hid.value = LastName.value; } document.the_form.action = ""> document.the_form.submit(); } function orderSubmit() { with (document.the_form) { FirstName_hid.value = FirstName.value; LastName_hid.value = LastName.value; } document.the_form.action = ""> document.the_form.submit(); } /script form name=the_form method=post input type=text name=FirstName id=FirstName value= size=56br input type=text name=LastName id=LastName value= size=56 input type=hidden name=FirstName_hid value= input type=hidden name=LastName_hid value= input type=button name=Rent value=Rental Form > input type=button name=Order value=Order Form > /form When I click on the Rent button, I am taken to RentalForm.cfm. In this file, I have a cfdump var=#form# It dumps all the form variables as I expect it to. But when I click on the Order button, I get directed to OrderForm.cfm but the cfdump on that page displays nothing. I don't understand why I don't see the form variables? Can somebody show/tell me how to fix this problem. Many Thanks, Allan __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ http://launch.yahoo.com/promos/britneyspears/ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:form variables not passed to action page - please help!
have finally got it all working, have ditched _javascript_. Am doing the check on the server side with help from someone in another forum. I would recommend you to do it without _javascript_. 1) remove all _javascript_ 2) in main file put: form name=the_form method=post action=""> 3) buttons: input type=submit name=action value=Rental Form input type=submit name=action value=Order Form 4) create file resolveform.cfm: cfif Form.action EQ Rental Form cfinclude template=RentalForm.cfm cfelseif Form.action EQ Order Form cfinclude template=OrderForm.cfm /cfif Many Thanks for your help Guys No, the server license won't matter. You can save yourself a lot of work by using the preservedata attribute of the cfform tag.Just make fields that are the same name in the next page of the wizard.They'll be automatically populated upon submit. - Original Message - From: ColdFusion Programmer [EMAIL PROTECTED] Date: Monday, November 3, 2003 7:39 am Subject: Re:form variables not passed to action page - please help! One thing I forgot to mention in my previous post, I have CFMX developer edition on my local development server, both the action pages display the form variables, it all works. However I've got CFMX Standard edition on my server and it does not display the form variables when the order button is clicked. Does the server licence got anything to do with the problem I've having? I hope not. Both are Windows 2000 Machines I'm assigning the form field values to hidden variables because it is a 4 pages form and I am passing the values from one page to another in hidden variables. I have chceked the code in both the action pages, they both have the same code, I just don't understand what's happenning here, I've turned debugging on. One another thing I've noticed is if I remove the id attribute from the text input fields, I get a _javascript_ error when submitting the form (form variable FirstName is not undefined). I thought the id attribute was optional. Any ideas? okay I copied your code and made a rental and order page. the page submits fine to either page depending on which button I press. One thing I dont understand is why you are assingning the values from a form field that is already being passed into a hidden field that is also passed? couldnt you do this in the js functions? function rentSubmit() { document.the_form.action = ""> document.the_form.submit(); } function orderSubmit() { document.the_form.action = ""> document.the_form.submit(); } but, either way it seems to be submitting fine. i guess you could check the syntax of your dump statement on the one page, and also turn debugging on to seethe form variables being passed. hope this helps. -Original Message- From: Allan Clarke [EMAIL PROTECTED] Sent: Monday, November 03, 2003 10:06 AM To: CF-Talk Subject: form variables not passed to action page - please help! Hi Guys, Am really hoping for someone to help me. I have this problem and can't find a solution. I have a form with two buttons with an onClick event each. Each button calls a _javascript_ function. When the user clicks on the button, I'm assigning all form field values to hidden variables. When I dump the form values on the action page, I see the form field values (including hidden form field values) for button 1, but don't see the same when button 2 is clicked. Here is my code script LANGUAGE=_javascript_ function rentSubmit() { with (document.the_form) { FirstName_hid.value = FirstName.value; LastName_hid.value = LastName.value; } document.the_form.action = ""> document.the_form.submit(); } function orderSubmit() { with (document.the_form) { FirstName_hid.value = FirstName.value; LastName_hid.value = LastName.value; } document.the_form.action = ""> document.the_form.submit(); } /script form name=the_form method=post input type=text name=FirstName id=FirstName value= size=56br input type=text name=LastName id=LastName value= size=56 input type=hidden name=FirstName_hid value= input type=hidden name=LastName_hid value= input type=button name=Rent value=Rental Form > input type=button name=Order value=Order Form > /form When I click on the Rent button, I am taken to RentalForm.cfm. In this file, I have a cfdump var=#form# It dumps all the form variables as I expect it to. But when I click on the Order button, I get directed to OrderForm.cfm but the cfdump on that page displays nothing. I don't understand why I don't see the form variables? Can somebody show/tell me how to fix this problem. Many Thanks, Allan __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ target=lhttp://launch.yahoo.com/promos/britneyspears/
Re:cfhttp returns nothing
Both the asp and coldfusion file that invokes the asp file are in the same directory under my webroot. In IIS I edited the .asp file properties, clicked on the File Security tab, hit the Edit button under the Annoymous access and authentication control section, checked the Annoymous access tick box and unchecked the Integrated Windows Authentication tick box. When I browse the .asp file directly in the browser (after visting the site home page to allow global.asa set the session and cookie scope variabes), response.write outputs the cookie and session variable values. But when I do the same using the cfhttp tag, I don't see anything being outputted. Can anyone tell me what I need to do for cfhttp to display the cookie and session variables. I am just using the url and get attributes, do I have to use other attributes too? Hi Everybody, I am trying to invoke a .asp file using the cfhttp tag. CFHTTP url=""> method=GET/ Here is my asp code: [EMAIL PROTECTED]VBSCRIPT% % Dim userEmail userEmail = session(user.email) Response.Write userEmail response.write request.Cookies(user.email) % When I dump the responseheader cfhttp attribute cfdump var=#CFHTTP.responseHeader#, this is what gets returned Cache-control private Connection close Content-Length 0 Content-Type text/html Date Mon, 27 Oct 2003 14:29:50 GMT Explanation OK Http_Version HTTP/1.1 Server Microsoft-IIS/5.0 Set-Cookie struct 1 user%2Eemail=; path=/ 2 ASPSESSIONIDCAACRDRT=MCFBGIHCKINECGDGCJHAHDPL; path=/ Status_Code 200 cfhttp.filecontent returns nothing. I can't understand why the session and cookie scope variables are not returned. I am using coldfion mx, I don't have a application.cfm file, all the session and cookie variables are declared and set in the asp global.asa file. Please can somebody help me Many Thanks Allan __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Hidden variables and passing data from one page to another
yes that's correct, I am not using ColdFusion to do this, I have been asked to do this in html and _javascript_. Is it possible to do pass hidden form variables from one page to another using html and _javascript_? Are there any other ways to do this? On Thursday 23 Oct 2003 16:24 pm, Allan Clarke wrote: To: CF-Talk I am not using any server side language, only _javascript_ and html. Ermm... ? -- Tom Chiverton Advanced ColdFusion Programmer Tel: +44(0)1749 834997 email: [EMAIL PROTECTED] BlueFinger Limited Underwood Business Park Wookey Hole Road, WELLS. BA5 1AF Tel: +44 (0)1749 834900 Fax: +44 (0)1749 834901 web: www.bluefinger.com Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple Quay, BRISTOL. BS1 6EG. *** This E-mail contains confidential information for the addressee only. If you are not the intended recipient, please notify us immediately. You should not use, disclose, distribute or copy this communication if received in error. No binding contract will result from this e-mail until such time as a written document is signed on behalf of the company. BlueFinger Limited cannot accept responsibility for the completeness or accuracy of this message as it has been transmitted over public networks.*** [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Hidden variables and passing data from one page to another
On the next page how do I get the get the value stored in the hidden variable. Can I use form.hidVariable when the method is post? just post the form to the next pageno JS required...basic HTML unless I'm missing your point?? - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Thursday, October 23, 2003 8:40 AM Subject: Re:Hidden variables and passing data from one page to another yes that's correct, I am not using ColdFusion to do this, I have been asked to do this in html and _javascript_. Is it possible to do pass hidden form variables from one page to another using html and _javascript_? Are there any other ways to do this? On Thursday 23 Oct 2003 16:24 pm, Allan Clarke wrote: To: CF-Talk I am not using any server side language, only _javascript_ and html. Ermm... ? -- Tom Chiverton Advanced ColdFusion Programmer Tel: +44(0)1749 834997 email: [EMAIL PROTECTED] BlueFinger Limited Underwood Business Park Wookey Hole Road, WELLS. BA5 1AF Tel: +44 (0)1749 834900 Fax: +44 (0)1749 834901 web: www.bluefinger.com Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple Quay, BRISTOL. BS1 6EG. *** This E-mail contains confidential information for the addressee only. If you are not the intended recipient, please notify us immediately. You should not use, disclose, distribute or copy this communication if received in error. No binding contract will result from this e-mail until such time as a written document is signed on behalf of the company. BlueFinger Limited cannot accept responsibility for the completeness or accuracy of this message as it has been transmitted over public networks.*** [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Hidden variables and passing data from one page to another
Can you post few examples of storing the values in cookies? I would really appreciate your help. You can't get them in JS with method post. Your only options AFAIK are to use the method get or to set them as cookies before posting. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: donderdag 23 oktober 2003 17:49 To: CF-Talk Subject: Re:Hidden variables and passing data from one page to another On the next page how do I get the get the value stored in the hidden variable. Can I use form.hidVariable when the method is post? just post the form to the next pageno JS required...basic HTML unless I'm missing your point?? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Hidden variables and passing data from one page to another
yes when the form is submitted an email is sent to the manager to inform him that a customer has ordered for a desktop. There is no transaction involved. What's the business process of how ordering is supposed to work? When a person orders something through the web interface is it supposed to notify somebody at the company that an order was placed? If so, then AFAIK there is going to have to be a server-side something. A client-side only solution is only going to notify the client. So while it may technically be possible to pass the variables and read them, what good are they? Unless you are just having them print out a completed order form and snail-mail it or something? Or maybe I'm missing something? -Kevin - Original Message - From: ColdFusion Programmer [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, October 23, 2003 10:40 AM Subject: Re:Hidden variables and passing data from one page to another yes that's correct, I am not using ColdFusion to do this, I have been asked to do this in html and _javascript_. Is it possible to do pass hidden form variables from one page to another using html and _javascript_? Are there any other ways to do this? On Thursday 23 Oct 2003 16:24 pm, Allan Clarke wrote: To: CF-Talk I am not using any server side language, only _javascript_ and html. Ermm... ? -- Tom Chiverton Advanced ColdFusion Programmer Tel: +44(0)1749 834997 email: [EMAIL PROTECTED] BlueFinger Limited Underwood Business Park Wookey Hole Road, WELLS. BA5 1AF Tel: +44 (0)1749 834900 Fax: +44 (0)1749 834901 web: www.bluefinger.com Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple Quay, BRISTOL. BS1 6EG. *** This E-mail contains confidential information for the addressee only. If you are not the intended recipient, please notify us immediately. You should not use, disclose, distribute or copy this communication if received in error. No binding contract will result from this e-mail until such time as a written document is signed on behalf of the company. BlueFinger Limited cannot accept responsibility for the completeness or accuracy of this message as it has been transmitted over public networks.*** [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFHTTP Question!
I took your advise Stephen and copied the contents of the include file into a new file and saved it as a coldfusion file. I am using cfinclude to call this file. There is a if condition in the include file which is in asp. % if session(user.supportuser) = TRUE then % Do Something % end if % I am trying to re-write this in coldfusion but I don't know how to do it. It is probably a silly question, but can ColdFusion read an asp session variable? I have tried to dump the session scope but get an error. I don't have a application.cfm file. If I can get this working then my problem is solved. Stephen Moritti's post As a side thought If that menu.asp is actually just a bunch of html with no asp code in there, the you could just use cfinclude to drag it into your cf code. Or you could bin that asp junk altogether and.~joking~ ;o) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFHTTP Question!
Can somebody please advise me what to do? I took your advise Stephen and copied the contents of the include file into a new file and saved it as a coldfusion file. I am using cfinclude to call this file. There is a if condition in the include file which is in asp. % if session(user.supportuser) = TRUE then % Do Something % end if % I am trying to re-write this in coldfusion but I don't know how to do it. It is probably a silly question, but can ColdFusion read an asp session variable? I have tried to dump the session scope but get an error. I don't have a application.cfm file. If I can get this working then my problem is solved. Stephen Moritti's post As a side thought If that menu.asp is actually just a bunch of html with no asp code in there, the you could just use cfinclude to drag it into your cf code. Or you could bin that asp junk altogether and.~joking~ ;o) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFHTTP Question!
Thanks Mark for your explaination and yes that makes sense. I will try to get the asp session variable value from one of three ways your suggested (form,url,cookie). Many Thanks Sorry If you question is can I read ASP sessions the answer is no.You cannot get sessions in Cold Fusion without the cfapplication tag (sessionmanagement=YES).so... if you are trying to pass a session variable to CF from an ASP page it will have to be done using post or get (url or form or possibly cookie variables).If you are rewriting the whole thing, then start with the Cfapplication tag and build a session scope with the variables you need (like user.supportuser). Does this help? -Mark -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 9:48 AM To: CF-Talk Subject: Re:CFHTTP Question! Can somebody please advise me what to do? I took your advise Stephen and copied the contents of the include file into a new file and saved it as a coldfusion file. I am using cfinclude to call this file. There is a if condition in the include file which is in asp. % if session(user.supportuser) = TRUE then % Do Something % end if % I am trying to re-write this in coldfusion but I don't know how to do it. It is probably a silly question, but can ColdFusion read an asp session variable? I have tried to dump the session scope but get an error. I don't have a application.cfm file. If I can get this working then my problem is solved. Stephen Moritti's post As a side thought If that menu.asp is actually just a bunch of html with no asp code in there, the you could just use cfinclude to drag it into your cf code. Or you could bin that asp junk altogether and.~joking~ ;o) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Form and hidden variable question
Makes no difference, the value in the hidden variable is still empty. I tried this is in subme function: document.frm.txtarea1.value = document.frm.outputselection.value; On form submission, I see the textarea briefly populated with the value in the hidden variable but it dissapears when the form is fully submitted. Should I be adding something between the textarea tag? textareaSomething/textarea [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Form and hidden variable question
actually Hugo, setting the return to false does do the trick. Sorry about that. In the function I'm returning true and it displays the value in the hidden variable in the textarea. document.frm.txtarea1.value = document.frm.outputselection.value; return true; input NAME=submitbutton TYPE=submit return false; VALUE=Calculate Many Thanks for your help [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFHTTP Question!
When I output the http response headers, this is what gets displayed Output the Response Headers: Date : Mon, 20 Oct 2003 15:20:34 GMT Server : Microsoft-IIS/5.0 Content-Length : 4431 Content-Type : text/html Explanation : Access Denied Connection : close Status_Code : 401 WWW-Authenticate : NTLM Http_Version : HTTP/1.1 Does anybody have any ideas? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFHTTP Question!
so what are you suggesting? How do I use HTTP authentication mechanism? ColdFusion Programmer wrote: Date : Mon, 20 Oct 2003 15:20:34 GMT Server : Microsoft-IIS/5.0 Content-Length : 4431 Content-Type : text/html Explanation : Access Denied Connection : close Status_Code : 401 WWW-Authenticate : NTLM Http_Version : HTTP/1.1 Does anybody have any ideas? According to the web server, you need to use HTTP authentication (mechanism described in RFC 2617) using the propietary NTLM system from Microsoft. I doubt that is implemented in cfhttp. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFHTTP Question!
This is the code I have got on my Coldfusion file CFHTTP url="" METHOD=GET RESOLVEURL=true throwonerror=yes/ cfoutput#CFHTTP.FileContent# /cfoutput I get an error: You are not authorized to view this page You do not have permission to view this directory or page using the credentials you supplied. Can somebody tell me what am I doing wrong Thanks Hello everybody, I'm trying to call a .asp file from my coldfusion page using cfhttp and I keep getting errors. Both files are on the same server, just different folders under the site webroot. This should explain it: The ColdFusion file is in C:\Inetpub\wwwroot\myProject\pages\folder1\searchreport.cfm and the ASP file is in C:\Inetpub\wwwroot\myProject\site\includes\topmenu\folder2\menu.asp. Can somebody show me how to use cfhttp to call the asp file (menu.asp) in my coldfusion file (searchreport.cfm) Many Thanks Allan __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFHTTP Question!
When I browse the asp file in the browse, it displays the menu on the browser. This is the url I'm using: http://myProject/site/includes/topmenu/folder2/menu.asp But when I include this url in cfhttp I get You are not authorized to view this page You do not have permission to view this directory or page using the credentials you supplied. error. Here is my code: CFHTTP url="" METHOD=GET RESOLVEURL=true throwonerror=yes/ cfoutput#CFHTTP.FileContent# /cfoutput Am I missing some attributes in my cfhttp tag? Allan, What is the URL you need to type into a browser in order to run menu.asp? That is the URL you need to specify for using CFHTTP. (Remember when using CFHTTP it is the ColdFusion server running the request so the URL needs to be from the perspective of what the ColdFusion server can see the menu.asp page as which could mean using a 127.0.0.1 or localhost address since it is on the same server. Also, in general better to use IP addresses to avoid domain name resolution issues though you loose the obvious benefits.) Andr -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: 17 October 2003 16:01 To: CF-Talk Subject: CFHTTP Question! Hello everybody, I'm trying to call a .asp file from my coldfusion page using cfhttp and I keep getting errors. Both files are on the same server, just different folders under the site webroot. This should explain it: The ColdFusion file is in C:\Inetpub\wwwroot\myProject\pages\folder1\searchreport.cfm and the ASP file is in C:\Inetpub\wwwroot\myProject\site\includes\topmenu\folder2\menu.asp. Can somebody show me how to use cfhttp to call the asp file (menu.asp) in my coldfusion file (searchreport.cfm) Many Thanks Allan __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFFILE Question
I was hoping somebody could show me how to do this. Thanks If the files are big this will eat memory . Consider using the underlying OS to dfo this sort of thing. use cfexecute to run a batch file for instance, e.g. COPY SupportiSearches*.log destinationfile.log That should do exactly what you want, very, very quickly! -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:12 To: CF-Talk Subject: CFFILE Question Hello Everybody, I want to see the contents of a directory on the server. I know there is a function in CF to do this, GetTemplatePath, cfdirectory or something (not sure). The directory path will not change. I want to first get to the directory and then find all log files in the directory beginning with SupportiSearches. There are going to be more than one file with that name. The idea is to append the contents of log files into one log file. To give you a better understanding, take for instance there are 2 log files under the directory called: Support2003-09.log and Support2003-08.log. I want to read the contents stored in these files, both files are identical in that the content is comma separated and both files have the same no of columns. I want to read the contents of the files using cffile and append the contents stored in the files in one file. I hope this is making sense. Can somebody please show me how to do this. Best Regards Allan __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFFILE Question
I've tried doing this and I get an error: cfexecute name=copy D:\CFusionMX\wwwroot\logReport\SupportiSearches*.log destination.log timeout=5/cfexecute If you want the cf template to finish quickly you could always exclude timeout value from cfexecute aswell, cf then won't wait for any console output. cfexecute name=mybatchfile.bat / Should do the trick. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:34 To: CF-Talk Subject: Re:CFFILE Question I was hoping somebody could show me how to do this. Thanks If the files are big this will eat memory . Consider using the underlying OS to dfo this sort of thing. use cfexecute to run a batch file for instance, e.g. COPY SupportiSearches*.log destinationfile.log That should do exactly what you want, very, very quickly! -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:12 To: CF-Talk Subject: CFFILE Question Hello Everybody, I want to see the contents of a directory on the server. I know there is a function in CF to do this, GetTemplatePath, cfdirectory or something (not sure). The directory path will not change. I want to first get to the directory and then find all log files in the directory beginning with SupportiSearches. There are going to be more than one file with that name. The idea is to append the contents of log files into one log file. To give you a better understanding, take for instance there are 2 log files under the directory called: Support2003-09.log and Support2003-08.log. I want to read the contents stored in these files, both files are identical in that the content is comma separated and both files have the same no of columns. I want to read the contents of the files using cffile and append the contents stored in the files in one file. I hope this is making sense. Can somebody please show me how to do this. Best Regards Allan __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFFILE Question
Craig, I don't why I get an error when I run the script on the browser. Here is my code: cfexecute name=supportSearches.bat / The error I get is: An exception occurred when invoking an external process. The cause of this exception was that: java.io.IOException: CreateProcess: supportSearches.bat error=2. The error occurred in D:\CFusionMX\wwwroot\logReport\Search.cfm: line cfexecute name=supportSearches.bat / When I run the bat file from the command prompt it works fine, but when get an error when I run it using cfexecute. I'm using CFMX Nope, create a batch file and execute that. Contents of mybatchfile.bat copy D:\CFusionMX\wwwroot\logReport\SupportiSearches*.log D:\CFusionMX\wwwroot\logReport\destination.log /Y (the /Y stops prompting to overwrite existing files) Then.. cfexecute name=mybatchfile.bat / from the cf template. Craig. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:49 To: CF-Talk Subject: Re:CFFILE Question I've tried doing this and I get an error: cfexecute name=copy D:\CFusionMX\wwwroot\logReport\SupportiSearches*.log destination.log timeout=5/cfexecute If you want the cf template to finish quickly you could always exclude timeout value from cfexecute aswell, cf then won't wait for any console output. cfexecute name=mybatchfile.bat / Should do the trick. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:34 To: CF-Talk Subject: Re:CFFILE Question I was hoping somebody could show me how to do this. Thanks If the files are big this will eat memory . Consider using the underlying OS to dfo this sort of thing. use cfexecute to run a batch file for instance, e.g. COPY SupportiSearches*.log destinationfile.log That should do exactly what you want, very, very quickly! -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:12 To: CF-Talk Subject: CFFILE Question Hello Everybody, I want to see the contents of a directory on the server. I know there is a function in CF to do this, GetTemplatePath, cfdirectory or something (not sure). The directory path will not change. I want to first get to the directory and then find all log files in the directory beginning with SupportiSearches. There are going to be more than one file with that name. The idea is to append the contents of log files into one log file. To give you a better understanding, take for instance there are 2 log files under the directory called: Support2003-09.log and Support2003-08.log. I want to read the contents stored in these files, both files are identical in that the content is comma separated and both files have the same no of columns. I want to read the contents of the files using cffile and append the contents stored in the files in one file. I hope this is making sense. Can somebody please show me how to do this. Best Regards Allan __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFFILE Question
wolla! got it to work finally, thanks Craig. Error number 2 = Can't find file. Try using the full path of the batch file. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 11:05 To: CF-Talk Subject: Re:CFFILE Question Craig, I don't why I get an error when I run the script on the browser. Here is my code: cfexecute name=supportSearches.bat / The error I get is: An exception occurred when invoking an external process. The cause of this exception was that: java.io.IOException: CreateProcess: supportSearches.bat error=2. The error occurred in D:\CFusionMX\wwwroot\logReport\Search.cfm: line cfexecute name=supportSearches.bat / When I run the bat file from the command prompt it works fine, but when get an error when I run it using cfexecute. I'm using CFMX Nope, create a batch file and execute that. Contents of mybatchfile.bat copy D:\CFusionMX\wwwroot\logReport\SupportiSearches*.log D:\CFusionMX\wwwroot\logReport\destination.log /Y (the /Y stops prompting to overwrite existing files) Then.. cfexecute name=mybatchfile.bat / from the cf template. Craig. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:49 To: CF-Talk Subject: Re:CFFILE Question I've tried doing this and I get an error: cfexecute name=copy D:\CFusionMX\wwwroot\logReport\SupportiSearches*.log destination.log timeout=5/cfexecute If you want the cf template to finish quickly you could always exclude timeout value from cfexecute aswell, cf then won't wait for any console output. cfexecute name=mybatchfile.bat / Should do the trick. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:34 To: CF-Talk Subject: Re:CFFILE Question I was hoping somebody could show me how to do this. Thanks If the files are big this will eat memory . Consider using the underlying OS to dfo this sort of thing. use cfexecute to run a batch file for instance, e.g. COPY SupportiSearches*.log destinationfile.log That should do exactly what you want, very, very quickly! -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:12 To: CF-Talk Subject: CFFILE Question Hello Everybody, I want to see the contents of a directory on the server. I know there is a function in CF to do this, GetTemplatePath, cfdirectory or something (not sure). The directory path will not change. I want to first get to the directory and then find all log files in the directory beginning with SupportiSearches. There are going to be more than one file with that name. The idea is to append the contents of log files into one log file. To give you a better understanding, take for instance there are 2 log files under the directory called: Support2003-09.log and Support2003-08.log. I want to read the contents stored in these files, both files are identical in that the content is comma separated and both files have the same no of columns. I want to read the contents of the files using cffile and append the contents stored in the files in one file. I hope this is making sense. Can somebody please show me how to do this. Best Regards Allan __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFFILE Question
actually Craig, I get an error the first time I run the script on the browser. Here is what I'm doing cfexecute name=D:\CFusionMX\wwwroot\supportSearches.bat / cffile action=""> file=D:\CFusionMX\wwwroot\supportSearchesFinal.log variable=fOutput CFFILE throws an error: An error occurred when performing a file operation read on file D:\CFusionMX\wwwroot\supportSearchesFinal.log. The cause of this exception was: java.io.FileNotFoundException: D:\CFusionMX\wwwroot\supportSearchesFinal.log (The system cannot find the file specified). Can you suggest a way round this problem? wolla! got it to work finally, thanks Craig. Error number 2 = Can't find file. Try using the full path of the batch file. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 11:05 To: CF-Talk Subject: Re:CFFILE Question Craig, I don't why I get an error when I run the script on the browser. Here is my code: cfexecute name=supportSearches.bat / The error I get is: An exception occurred when invoking an external process. The cause of this exception was that: java.io.IOException: CreateProcess: supportSearches.bat error=2. The error occurred in D:\CFusionMX\wwwroot\logReport\Search.cfm: line cfexecute name=supportSearches.bat / When I run the bat file from the command prompt it works fine, but when get an error when I run it using cfexecute. I'm using CFMX Nope, create a batch file and execute that. Contents of mybatchfile.bat copy D:\CFusionMX\wwwroot\logReport\SupportiSearches*.log D:\CFusionMX\wwwroot\logReport\destination.log /Y (the /Y stops prompting to overwrite existing files) Then.. cfexecute name=mybatchfile.bat / from the cf template. Craig. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:49 To: CF-Talk Subject: Re:CFFILE Question I've tried doing this and I get an error: cfexecute name=copy D:\CFusionMX\wwwroot\logReport\SupportiSearches*.log destination.log timeout=5/cfexecute If you want the cf template to finish quickly you could always exclude timeout value from cfexecute aswell, cf then won't wait for any console output. cfexecute name=mybatchfile.bat / Should do the trick. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:34 To: CF-Talk Subject: Re:CFFILE Question I was hoping somebody could show me how to do this. Thanks If the files are big this will eat memory . Consider using the underlying OS to dfo this sort of thing. use cfexecute to run a batch file for instance, e.g. COPY SupportiSearches*.log destinationfile.log That should do exactly what you want, very, very quickly! -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 10:12 To: CF-Talk Subject: CFFILE Question Hello Everybody, I want to see the contents of a directory on the server. I know there is a function in CF to do this, GetTemplatePath, cfdirectory or something (not sure). The directory path will not change. I want to first get to the directory and then find all log files in the directory beginning with SupportiSearches. There are going to be more than one file with that name. The idea is to append the contents of log files into one log file. To give you a better understanding, take for instance there are 2 log files under the directory called: Support2003-09.log and Support2003-08.log. I want to read the contents stored in these files, both files are identical in that the content is comma separated and both files have the same no of columns. I want to read the contents of the files using cffile and append the contents stored in the files in one file. I hope this is making sense. Can somebody please show me how to do this. Best Regards Allan __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFFILE Question
This shows the batch files cmd output but does not error: cfexecute name=D:\CFusionMX\wwwroot\supportSearches.bat timeout=5/ Is there a way to not display the output? Yes, if you're reading the resultant file straight away, you have to make sure the batch file has finished 1st. (This is exaclty what Calvin suggested) Therefore don't exclude the timeout value on cfexecute. This will show the batch files cmd output... cfexecute name=D:\CFusionMX\wwwroot\supportSearches.bat timeout=5 /cfexecute This will not... cfexecute name=D:\CFusionMX\wwwroot\supportSearches.bat timeout=5/ This also will not, and won't even wait for the batch file to finish before continuing to process the rest of the cfml template (current). cfexecute name=D:\CFusionMX\wwwroot\supportSearches.bat / [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:CFFILE Question
Nice one, should have thought about that, many thanks Craig cfsilent ?? -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 15 October 2003 12:48 To: CF-Talk Subject: Re:CFFILE Question This shows the batch files cmd output but does not error: cfexecute name=D:\CFusionMX\wwwroot\supportSearches.bat timeout=5/ Is there a way to not display the output? Yes, if you're reading the resultant file straight away, you have to make sure the batch file has finished 1st. (This is exaclty what Calvin suggested) Therefore don't exclude the timeout value on cfexecute. This will show the batch files cmd output... cfexecute name=D:\CFusionMX\wwwroot\supportSearches.bat timeout=5 /cfexecute This will not... cfexecute name=D:\CFusionMX\wwwroot\supportSearches.bat timeout=5/ This also will not, and won't even wait for the batch file to finish before continuing to process the rest of the cfml template (current). cfexecute name=D:\CFusionMX\wwwroot\supportSearches.bat / _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:SQL Statement help!
Thank you everybody for your help. Tony, the code in your last post works just the way I want it to. Many Thanks again Allan first of all, whats this? cfoutput#DateFormat(Now()-7,/mm/dd)# - #qTmp.DateTime#/cfoutput dateAdd() needs to be in there for the -7 thing to work. here is the below in correct format. cfquery name=lQuery2 dbtype=query SELECTUserName, SearchString, Count(SearchString) AS Occurences FROMqTmp WHERE '#dateFormat(dateAdd('d',Now(),-7),'mm/dd/')#' '#dateFormat(dateTime,'mm/dd/')#' GROUP BY UserName, SearchString /cfquery hth ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 11:59 AM To: CF-Talk Subject: Re:SQL Statement help! I've tried this and it errors: cfoutput#DateFormat(Now()-7,/mm/dd)# - #qTmp.DateTime#/cfoutput cfquery name=lQuery2 dbtype=query SELECTUserName, SearchString, Count(SearchString) AS Occurences FROMqTmp WHERE cfqueryparam cfsqltype=cf_sql_timestamp value=#DateFormat(Now()-7,'/mm/dd')# DateTime GROUP BY UserName, SearchString /cfquery ok so format that value, with dateFormat, enclose it in 's and you should be good. ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 10:31 AM To: CF-Talk Subject: Re:SQL Statement help! I think this is what you mean DateTime - 2003/09/01 11:52:16 Now - {ts '2003-10-10 15:28:19'} whats the value of dateTime parse out to? ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 9:32 AM To: CF-Talk Subject: Re:SQL Statement help! I now get a different error Query Of Queries runtime error. Unsupported type comparison. ColdFusion Programmer wrote: Guys, I'm sorry for so many errors on my part. Jochem, the code your posted throws an error, Error Executing Database Query. Query Of Queries syntax error. Encountered { at line 0, column 0. Incorrect conditional _expression_, Expected one of [like|null|between|in|comparison] condition, SELECTUserName, SearchString, Count(SearchString) AS Occurences FROMqTmp WHERE cfqueryparam cfsqltype=cf_sql_timestamp value=#DateAdd(d,-7,Now())# DateTime GROUP BY UserName, SearchString Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Looping through a list, setting each listItem to a column
Thanks a lot Craig for your timely help. I'm using the code you posted, this was exactly what I was after, thanks again. Also thank you Peter for your help Best Regards Allan This works, it's a bit of a fudge, but it does the job. cfset qTmp = QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=fileLine delimiters=#Chr(10)# cfif listLen(fileLine) gte 4 cfset tmp = QueryAddRow(qTmp,1) cfif listLen(fileLine) gt 4 cfscript QuerySetCell(qTmp,DateTime, listGetAt(fileLine,1)); QuerySetCell(qTmp,User, listGetAt(fileLine,2)); QuerySetCell(qTmp,Status, listlast(fileLine)); x = listLen(fileLine) - 1; doc = ; for ( i = 3 ; i lte x ; i = i + 1 ){ doc = doc , listGetAt(fileLine,i); } QuerySetCell(qTmp,Document, doc); /cfscript cfelse cfscript QuerySetCell(qTmp,DateTime, listGetAt(fileLine,1)); QuerySetCell(qTmp,User, listGetAt(fileLine,2)); QuerySetCell(qTmp,Document, listGetAt(fileLine,3)); QuerySetCell(qTmp,Status, listGetAt(fileLine,4)); /cfscript /cfif /cfif /cfloop -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 09 October 2003 10:43 To: CF-Talk Subject: Re:Looping through a list, setting each listItem to a column I'm afraid it does not work. I replaced my script with yours and it did'nt work. There is one column which contains commas in it, I want to escape the comma, I have made an effort, but I can't get my head round it which is why I'm asking for other people's help. Here is an example 2003/09/09 14:49:05, TestUser1, /Doc/News/Budgeting,Forecasting Reporting.doc, OK As you can see the string /Doc/News/Budgeting,Forecasting Reporting.doc has a comma in it, I want to escape it. Thanks for your help The script wasn't meant to give you a regexp to replace the commas. It does the entire job of creating the query and takes the as a qualifier into consideration. Replace your script by mine and it should work. -Oorspronkelijk bericht- Van: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Verzonden: wo 8/10/2003 17:32 Aan: CF-Talk CC: Onderwerp: Re:Looping through a list, setting each listItem to a column I've tried that and it does not work. Here is my code cfscript myList = '2003/09/09 14:49:05, TestUser1, /Doc/News/Budgeting, Forecasting Reporting.doc, OK'; myList = REReplace(myList, '^[[:space:]]*([^, ]*|([^]|)*)[[:space:]]*(,|$)',''); /cfscript cfoutput#myList#/cfoutput This should do it in CF using regexp. There are probably custom tags that will read logs more efficiently though. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:SQL Statement help!
Hi Jochem, Can you explain what the where statement in your code does, I don't understand the the EXTRACT(DAYS FROM CURRENT_TIMESTAMP - DateTime) 7 bit Many Thanks Allan Clarke wrote: I have this table that keps a log of the user search activity. For ex, on the site search page of the site, if a user searches for a keyword test, it gets stored on the database table along with other details like the username, date/time, search category and the results found. The columns are DateTime, UserName, SearchKeyword, SearchCategory and ResultsFound I want to display it like this In the last 7 days powerpoint,word,excel,notepadtestUser1 SELECT UserName, SearchKeyWord, Count(SearchKeyWord) AS Occurences FROM table WHERE EXTRACT(DAYS FROM CURRENT_TIMESTAMP - DateTime) 7 GROUP BY UserName, SearchKeyWord Then use cfoutput with the group attribute to display everything n one line. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:SQL Statement help!
This is what I'm doing, and I get an error. I'm using SQL Server 2000 cfquery name=lQuery2 dbtype=query SELECT UserName, SearchString, Count(SearchString) AS Occurences FROM WHERE (#DateFormat(Now(),/mm/dd)# #TimeFormat(Now(),HH:mm:ss)# - #qTmp.DateTime#) 7 qTmp GROUP BY UserName, SearchString /cfquery I get this error: Query Of Queries syntax error. Encountered WHERE at line 0, column 0. ColdFusion Programmer wrote: Hi Jochem, Can you explain what the where statement in your code does, I don't understand the the EXTRACT(DAYS FROM CURRENT_TIMESTAMP - DateTime) 7 bit Read it inside out: CURRENT_TIMESTAMP - the current date and time, 'now' DateTime- your field with the moment of the search, 'then' CURRENT_TIMESTAMP - DateTime- the interval between now and then EXTRACT(DAYS FROM ..)- the number of whole days in that interval So what it says is that DateTime should be less than 7 days in the past in standard SQL syntax. If your database does not support standard SQL syntax, you might have to rewrite it in something your database understands, but that should be explained in the manual. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:SQL Statement help!
Sorry this is the query I'm using cfquery name=lQuery2 dbtype=query SELECT UserName, SearchString, Count(SearchString) AS Occurences FROM qTmp WHERE (#Now()# - DateTime) 7 GROUP BY UserName, SearchString /cfquery This is what I'm doing, and I get an error. I'm using SQL Server 2000 cfquery name=lQuery2 dbtype=query SELECT UserName, SearchString, Count(SearchString) AS Occurences FROM WHERE (#DateFormat(Now(),/mm/dd)# #TimeFormat(Now(),HH:mm:ss)# - #qTmp.DateTime#) 7 qTmp GROUP BY UserName, SearchString /cfquery I get this error: Query Of Queries syntax error. Encountered WHERE at line 0, column 0. ColdFusion Programmer wrote: Hi Jochem, Can you explain what the where statement in your code does, I don't understand the the EXTRACT(DAYS FROM CURRENT_TIMESTAMP - DateTime) 7 bit Read it inside out: CURRENT_TIMESTAMP - the current date and time, 'now' DateTime- your field with the moment of the search, 'then' CURRENT_TIMESTAMP - DateTime- the interval between now and then EXTRACT(DAYS FROM ..)- the number of whole days in that interval So what it says is that DateTime should be less than 7 days in the past in standard SQL syntax. If your database does not support standard SQL syntax, you might have to rewrite it in something your database understands, but that should be explained in the manual. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:SQL Statement help!
Guys, I'm sorry for so many errors on my part. Jochem, the code your posted throws an error, Error Executing Database Query. Query Of Queries syntax error. Encountered { at line 0, column 0. Incorrect conditional _expression_, Expected one of [like|null|between|in|comparison] condition, Any ideas? ColdFusion Programmer wrote: This is what I'm doing, and I get an error. I'm using SQL Server 2000 No, you are not. Since your dbtype is query, you are using CF. cfquery name=lQuery2 dbtype=query SELECT UserName, SearchString, Count(SearchString) AS Occurences FROM WHERE (#DateFormat(Now(),/mm/dd)# #TimeFormat(Now(),HH:mm:ss)# - #qTmp.DateTime#) 7qTmp GROUP BY UserName, SearchString /cfquery SELECTUserName, SearchString, Count(SearchString) AS Occurences FROMqTmp WHERE #DateAdd(d,-7,Now())# DateTime GROUP BY UserName, SearchString Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:SQL Statement help!
I now get a different error Query Of Queries runtime error. Unsupported type comparison. ColdFusion Programmer wrote: Guys, I'm sorry for so many errors on my part. Jochem, the code your posted throws an error, Error Executing Database Query. Query Of Queries syntax error. Encountered { at line 0, column 0. Incorrect conditional _expression_, Expected one of [like|null|between|in|comparison] condition, SELECTUserName, SearchString, Count(SearchString) AS Occurences FROMqTmp WHERE cfqueryparam cfsqltype=cf_sql_timestamp value=#DateAdd(d,-7,Now())# DateTime GROUP BY UserName, SearchString Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:SQL Statement help!
I think this is what you mean DateTime - 2003/09/01 11:52:16 Now - {ts '2003-10-10 15:28:19'} whats the value of dateTime parse out to? ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 9:32 AM To: CF-Talk Subject: Re:SQL Statement help! I now get a different error Query Of Queries runtime error. Unsupported type comparison. ColdFusion Programmer wrote: Guys, I'm sorry for so many errors on my part. Jochem, the code your posted throws an error, Error Executing Database Query. Query Of Queries syntax error. Encountered { at line 0, column 0. Incorrect conditional _expression_, Expected one of [like|null|between|in|comparison] condition, SELECTUserName, SearchString, Count(SearchString) AS Occurences FROMqTmp WHERE cfqueryparam cfsqltype=cf_sql_timestamp value=#DateAdd(d,-7,Now())# DateTime GROUP BY UserName, SearchString Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:SQL Statement help!
I've tried this and it errors: cfoutput#DateFormat(Now()-7,/mm/dd)# - #qTmp.DateTime#/cfoutput cfquery name=lQuery2 dbtype=query SELECTUserName, SearchString, Count(SearchString) AS Occurences FROMqTmp WHERE cfqueryparam cfsqltype=cf_sql_timestamp value=#DateFormat(Now()-7,'/mm/dd')# DateTime GROUP BY UserName, SearchString /cfquery ok so format that value, with dateFormat, enclose it in 's and you should be good. ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 10:31 AM To: CF-Talk Subject: Re:SQL Statement help! I think this is what you mean DateTime - 2003/09/01 11:52:16 Now - {ts '2003-10-10 15:28:19'} whats the value of dateTime parse out to? ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 9:32 AM To: CF-Talk Subject: Re:SQL Statement help! I now get a different error Query Of Queries runtime error. Unsupported type comparison. ColdFusion Programmer wrote: Guys, I'm sorry for so many errors on my part. Jochem, the code your posted throws an error, Error Executing Database Query. Query Of Queries syntax error. Encountered { at line 0, column 0. Incorrect conditional _expression_, Expected one of [like|null|between|in|comparison] condition, SELECTUserName, SearchString, Count(SearchString) AS Occurences FROMqTmp WHERE cfqueryparam cfsqltype=cf_sql_timestamp value=#DateAdd(d,-7,Now())# DateTime GROUP BY UserName, SearchString Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Looping through a list, setting each listItem to a column
I'm afraid it does not work. I replaced my script with yours and it did'nt work. There is one column which contains commas in it, I want to escape the comma, I have made an effort, but I can't get my head round it which is why I'm asking for other people's help. Here is an example 2003/09/09 14:49:05, TestUser1, /Doc/News/Budgeting,Forecasting Reporting.doc, OK As you can see the string /Doc/News/Budgeting,Forecasting Reporting.doc has a comma in it, I want to escape it. Thanks for your help The script wasn't meant to give you a regexp to replace the commas. It does the entire job of creating the query and takes the as a qualifier into consideration. Replace your script by mine and it should work. -Oorspronkelijk bericht- Van: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Verzonden: wo 8/10/2003 17:32 Aan: CF-Talk CC: Onderwerp: Re:Looping through a list, setting each listItem to a column I've tried that and it does not work. Here is my code cfscript myList = '2003/09/09 14:49:05, TestUser1, /Doc/News/Budgeting, Forecasting Reporting.doc, OK'; myList = REReplace(myList, '^[[:space:]]*([^, ]*|([^]|)*)[[:space:]]*(,|$)',''); /cfscript cfoutput#myList#/cfoutput This should do it in CF using regexp. There are probably custom tags that will read logs more efficiently though. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Looping through a list, setting each listItem to a column
It does'nt work for me, I don't know what I'm doing wrong, I am doing exactly the same thing as you are, can't understand why it works for you and not me. The output from the dump looks like this DATETIME DOCUMENT STATUS USER 1 09-Oct-03 test2[empty string]test 2 2003/09/09 14:49:05/Doc/News/BudgetingForecasting Reporting.doc TestUser1 The script works for me. I am not escaping anything, just extracting the correct info from the csv (log). See code below. The only thing I changed is to take blank lines into consideration (it hanged my cf if there was a blank line at the end). Also: as I said before, there are custom tags that will read csv's more efficiently cfoutputcfsavecontent variable=fOutputDate User Webpage Status #DateFormat(Now())#, test, test2 2003/09/09 14:49:05, TestUser1, /Doc/News/Budgeting,Forecasting Reporting.doc, OK /cfsavecontent cfscript columns = DateTime,User,Document,Status; qTmp = QueryNew(columns); pattern = '^[[:space:]]*([^,]*|([^]|)*)[[:space:]]*(,|$)'; matchStruct = structNew(); for(i=2;i LE ListLen(fOutput,chr(10));i=i+1){ line = ListGetAt(fOutput,i,chr(10)); if(Len(line)){ QueryAddRow(qTmp,1); exit = false; j = 1; while(NOT exit){ // find matching pattern matchStruct = REFindNoCase(pattern,line,1,true); if(matchStruct.pos[1] AND j LE ListLen(columns)){ field = Mid(line,matchStruct.pos[2],matchStruct.len[2]); WriteOutput(#i#.#j#:|#field#|); QuerySetCell(qTmp,ListGetAt(columns,j),field); if(matchStruct.len[1]) line = RemoveChars(line,1,matchStruct.len[1]); j = j + 1; } else exit = true; } } } /cfscript h1Log/h1 pre #fOutput# /pre cfdump var=#qTmp# /cfoutput Pascal Peters Certified ColdFusion MX Advanced Developer Macromedia Certified Instructor LR Technologies Av. E. De Mot, 19 1000 BRUSSELS, BELGIUM Tel: +32 2 639 68 70 Fax: +32 2 639 68 99 Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Web: www.lrt.be -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: donderdag 9 oktober 2003 11:43 To: CF-Talk Subject: Re:Looping through a list, setting each listItem to a column I'm afraid it does not work. I replaced my script with yours and it did'nt work. There is one column which contains commas in it, I want to escape the comma, I have made an effort, but I can't get my head round it which is why I'm asking for other people's help. Here is an example 2003/09/09 14:49:05, TestUser1, /Doc/News/Budgeting,Forecasting Reporting.doc, OK As you can see the string /Doc/News/Budgeting,Forecasting Reporting.doc has a comma in it, I want to escape it. Thanks for your help The script wasn't meant to give you a regexp to replace the commas. It does the entire job of creating the query and takes the as a qualifier into consideration. Replace your script by mine and it should work. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:SQL Help - Correct Post
The log file stores a log of what the user has been searching on the site search. For example if the user searches for the keyword Fusion, the log file stores the information like this: I want to display the top 5 or 10 search keywords that users regularly search for and because this is logged in the log file I'm sure it is possible to get this information. Currently I'm displaying all the results with a simple sql statment. cfquery name=lQuery dbtype=query SELECT DISTINCT SearchString, DateTime, UserName, IndexName, ResultsFound, Status FROM qTmp ORDER BY IndexName asc /cfquery My sql skills are not very good and was wondering if someone could show me how to do this. I would really appreciate your help. Best Regards, Allan What is your question? -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: donderdag 9 oktober 2003 13:32 To: CF-Talk Subject: SQL Help - Correct Post cffile action=""> file=C:\Inetpub\wwwroot\logReport\dtSearchWeb2003-09.log variable=fOutput cfset qTmp = QueryNew(DateTime,UserName,SearchString,IndexName,ResultsFound,Status) cfloop list=#fOutput# index=fileLine delimiters=#Chr(10)# cfif listLen(fileLine) eq 6 cfscript tmp = QueryAddRow(qTmp,1); tmp=QuerySetCell(qTmp,DateTime, Replace(listGetAt(fileLine,1),,,All)); tmp=QuerySetCell(qTmp,UserName, Replace(LCase(listGetAt(fileLine,2)),,,All)); tmp=QuerySetCell(qTmp,SearchString, Replace(listGetAt(fileLine,3),,,All)); tmp=QuerySetCell(qTmp,IndexName, Replace(ListLast(listGetAt(fileLine,4),'\'),,,All)); tmp=QuerySetCell(qTmp,ResultsFound, Replace(listGetAt(fileLine,5),,,All)); tmp=QuerySetCell(qTmp,Status, Replace(listGetAt(fileLine,6),,,All)); /cfscript /cfif /cfloop Hi Everybody, The above code reads the log file and inserts the file content in an empty query with a set of columns. The log file stores a log of what the user has been searching on the site search. For example if the user searches for the keyword Fusion, the log file stores the information like this: Date/TimeKeyword CategoryResults Returned Status UserName _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:SQL Help - Correct Post
Thanks but I'm using this code to get the top 5 cfquery name=lKeywordFreq dbtype=query select SearchString, count(*) as freq from qTmp group by SearchString order by freq desc /cfquery cfoutput query=lKeywordFreq maxrows=1 TR vAlign=top TD vAlign=bottom width=50% bgColor=E4E4E4 #lKeywordFreq.SearchString# /TD TD vAlign=bottom width=50% #lKeywordFreq.Freq# /TD /TR /cfoutput Try: select top 10 count(distinct SearchString) AS total, SearchString FROM clients GROUP BY SearchString order by total desc -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Thursday, October 09, 2003 6:39 AM To: CF-Talk Subject: Re:SQL Help - Correct Post The log file stores a log of what the user has been searching on the site search. For example if the user searches for the keyword Fusion, the log file stores the information like this: I want to display the top 5 or 10 search keywords that users regularly search for and because this is logged in the log file I'm sure it is possible to get this information. Currently I'm displaying all the results with a simple sql statment. cfquery name=lQuery dbtype=query SELECT DISTINCT SearchString, DateTime, UserName, IndexName, ResultsFound, Status FROM qTmp ORDER BY IndexName asc /cfquery My sql skills are not very good and was wondering if someone could show me how to do this. I would really appreciate your help. Best Regards, Allan What is your question? -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: donderdag 9 oktober 2003 13:32 To: CF-Talk Subject: SQL Help - Correct Post cffile action=""> file=C:\Inetpub\wwwroot\logReport\dtSearchWeb2003-09.log variable=fOutput cfset qTmp = QueryNew(DateTime,UserName,SearchString,IndexName,ResultsFound, Status) cfloop list=#fOutput# index=fileLine delimiters=#Chr(10)# cfif listLen(fileLine) eq 6 cfscript tmp = QueryAddRow(qTmp,1); tmp=QuerySetCell(qTmp,DateTime, Replace(listGetAt(fileLine,1),,,All)); tmp=QuerySetCell(qTmp,UserName, Replace(LCase(listGetAt(fileLine,2)),,,All)); tmp=QuerySetCell(qTmp,SearchString, Replace(listGetAt(fileLine,3),,,All)); tmp=QuerySetCell(qTmp,IndexName, Replace(ListLast(listGetAt(fileLine,4),'\'),,,All)); tmp=QuerySetCell(qTmp,ResultsFound, Replace(listGetAt(fileLine,5),,,All)); tmp=QuerySetCell(qTmp,Status, Replace(listGetAt(fileLine,6),,,All)); /cfscript /cfif /cfloop Hi Everybody, The above code reads the log file and inserts the file content in an empty query with a set of columns. The log file stores a log of what the user has been searching on the site search. For example if the user searches for the keyword Fusion, the log file stores the information like this: Date/TimeKeyword CategoryResults Returned Status UserName _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Looping through a list, setting each listItem to a column
Craig, I tried running your code and get this error, Invalid list index 2. In function ListGetAt(list, index [, delimiters]), the value of index, 2, is not a valid as the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list. Any ideas? Try this.. cfset qTmp=QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=lIndex delimiters=#Chr(10)# cfset i = 0 cfset tmpstart=listLen(lIndex,',') cfset tmp=QueryAddRow(qTmp,listLen(lIndex,',')) cfloop list=#lIndex# index=innerList delimiters=, cfscript tmp=QuerySetCell(qTmp,DateTime, listGetAt(innerList,1)); tmp=QuerySetCell(qTmp,User, listGetAt(innerList,2)); tmp=QuerySetCell(qTmp,Document, listGetAt(innerList,3)); tmp=QuerySetCell(qTmp,Status, listGetAt(innerList,4)); /cfscript cfset i = i + 1 /cfloop /cfloop The listgetat function inside your inner loop is the only change i've made -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 11:16 To: CF-Talk Subject: Looping through a list, setting each listItem to a column Hello Everybody, I am trying to read a log file and display the results on a webpage. Here is what the log file looks. DateTime User Webpage Visited Status 2003/09/01 11:52:15, User\testUser1, /wwwroot/code/article_1.shtml, OK 2003/09/01 11:53:35, User\testUser2, /wwwroot/code/article_2.shtml, OK 2003/09/01 12:04:55, User\testUser3, /wwwroot/code/article_3.shtml, OK 2003/09/01 12:04:58, User\testUser4, /wwwroot/code/article_4.shtml, OK 2003/09/01 12:05:11, User\testUser5, /wwwroot/code/article_5.shtml, OK Here is the code to read the log file cffile action=""> file=C:\myLogFile.log variable=fOutput Take a look at the code below. As you can see I am looping through the list, finding the Carriage Return character. This is all fine, what I want to be able to do is loop through each individual row which is again a comma seprated list (2003/09/01 11:52:15, User\testUser1, /wwwroot/code/article_1.shtml, OK) append each list item in a temp table column. cfset qTmp=QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=lIndex delimiters=#Chr(10)# cfset i = 0 cfset tmpstart=listLen(lIndex,',') cfset tmp=QueryAddRow(qTmp,listLen(lIndex,',')) cfloop list=#lIndex# index=innerList delimiters=, cfscript tmp=QuerySetCell(qTmp,DateTime, innerList); tmp=QuerySetCell(qTmp,User, innerList); tmp=QuerySetCell(qTmp,Document, innerList); tmp=QuerySetCell(qTmp,Status, innerList); /cfscript cfset i = i + 1 /cfloop /cfloop cfquery name=lquery dbtype=query SELECT DISTINCT * FROM qTmp /cfquery The code above is not right, and I've tried hard to figure out how to loop through the inner comma separated list and assign the value to the query column. Can somebody please show me how to do this. I know my explaination is not very clear but I hope you know what I'm trying to do. If you think there is an easier way to do this then please let me know. Please can somebody help Regards John __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Looping through a list, setting each listItem to a column
Yes it does work now, thanks a ton for your speedy help. Cheers This works... cfset qTmp=QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=lIndex delimiters=#Chr(10)# cfset tmp=QueryAddRow(qTmp,1) cfloop list=#lIndex# index=i cfscript tmp=QuerySetCell(qTmp,DateTime, listGetAt(lIndex,1)); tmp=QuerySetCell(qTmp,User, listGetAt(lIndex,2)); tmp=QuerySetCell(qTmp,Document, listGetAt(lIndex,3)); tmp=QuerySetCell(qTmp,Status, listGetAt(lIndex,4)); /cfscript /cfloop /cfloop -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 11:32 To: CF-Talk Subject: Re:Looping through a list, setting each listItem to a column Craig, I tried running your code and get this error, Invalid list index 2. In function ListGetAt(list, index [, delimiters]), the value of index, 2, is not a valid as the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list. Any ideas? Try this.. cfset qTmp=QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=lIndex delimiters=#Chr(10)# cfset i = 0 cfset tmpstart=listLen(lIndex,',') cfset tmp=QueryAddRow(qTmp,listLen(lIndex,',')) cfloop list=#lIndex# index=innerList delimiters=, cfscript tmp=QuerySetCell(qTmp,DateTime, listGetAt(innerList,1)); tmp=QuerySetCell(qTmp,User, listGetAt(innerList,2)); tmp=QuerySetCell(qTmp,Document, listGetAt(innerList,3)); tmp=QuerySetCell(qTmp,Status, listGetAt(innerList,4)); /cfscript cfset i = i + 1 /cfloop /cfloop The listgetat function inside your inner loop is the only change i've made -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 11:16 To: CF-Talk Subject: Looping through a list, setting each listItem to a column Hello Everybody, I am trying to read a log file and display the results on a webpage. Here is what the log file looks. DateTime User Webpage Visited Status 2003/09/01 11:52:15, User\testUser1, /wwwroot/code/article_1.shtml, OK 2003/09/01 11:53:35, User\testUser2, /wwwroot/code/article_2.shtml, OK 2003/09/01 12:04:55, User\testUser3, /wwwroot/code/article_3.shtml, OK 2003/09/01 12:04:58, User\testUser4, /wwwroot/code/article_4.shtml, OK 2003/09/01 12:05:11, User\testUser5, /wwwroot/code/article_5.shtml, OK Here is the code to read the log file cffile action=""> file=C:\myLogFile.log variable=fOutput Take a look at the code below. As you can see I am looping through the list, finding the Carriage Return character. This is all fine, what I want to be able to do is loop through each individual row which is again a comma seprated list (2003/09/01 11:52:15, User\testUser1, /wwwroot/code/article_1.shtml, OK) append each list item in a temp table column. cfset qTmp=QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=lIndex delimiters=#Chr(10)# cfset i = 0 cfset tmpstart=listLen(lIndex,',') cfset tmp=QueryAddRow(qTmp,listLen(lIndex,',')) cfloop list=#lIndex# index=innerList delimiters=, cfscript tmp=QuerySetCell(qTmp,DateTime, innerList); tmp=QuerySetCell(qTmp,User, innerList); tmp=QuerySetCell(qTmp,Document, innerList); tmp=QuerySetCell(qTmp,Status, innerList); /cfscript cfset i = i + 1 /cfloop /cfloop cfquery name=lquery dbtype=query SELECT DISTINCT * FROM qTmp /cfquery The code above is not right, and I've tried hard to figure out how to loop through the inner comma separated list and assign the value to the query column. Can somebody please show me how to do this. I know my explaination is not very clear but I hope you know what I'm trying to do. If you think there is an easier way to do this then please let me know. Please can somebody help Regards John __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Looping through a list, setting each listItem to a column
thanks Craig, you've really been of great help. I have another question for you, what I've noticed is a couple of rows are not displayed because the document column has a documnet name with a comma in it. Here is an example. 2003/09/09 14:49:05, TestUser1, /Doc/News/Budgeting,Forecasting Reporting.doc, OK As you can see the document name /Doc/News/Budgeting,Forecasting Reporting.doc has a comma in it. And because our delimeter is , the list finds 4 items. Can you think of any way of getting round this problem. Cheers Allan Had a proper look at it, you actualy only need 1 loop. cfset qTmp = QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=fileLine delimiters=#Chr(10)# cfif listLen(fileLine) eq 4 cfset tmp = QueryAddRow(qTmp,1) cfscript tmp=QuerySetCell(qTmp,DateTime, listGetAt(fileLine,1)); tmp=QuerySetCell(qTmp,User, listGetAt(fileLine,2)); tmp=QuerySetCell(qTmp,Document, listGetAt(fileLine,3)); tmp=QuerySetCell(qTmp,Status, listGetAt(fileLine,4)); /cfscript /cfif /cfloop That should ignore any invalid lines too. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 11:52 To: CF-Talk Subject: Re:Looping through a list, setting each listItem to a column Yes it does work now, thanks a ton for your speedy help. Cheers This works... cfset qTmp=QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=lIndex delimiters=#Chr(10)# cfset tmp=QueryAddRow(qTmp,1) cfloop list=#lIndex# index=i cfscript tmp=QuerySetCell(qTmp,DateTime, listGetAt(lIndex,1)); tmp=QuerySetCell(qTmp,User, listGetAt(lIndex,2)); tmp=QuerySetCell(qTmp,Document, listGetAt(lIndex,3)); tmp=QuerySetCell(qTmp,Status, listGetAt(lIndex,4)); /cfscript /cfloop /cfloop -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 11:32 To: CF-Talk Subject: Re:Looping through a list, setting each listItem to a column Craig, I tried running your code and get this error, Invalid list index 2. In function ListGetAt(list, index [, delimiters]), the value of index, 2, is not a valid as the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list. Any ideas? Try this.. cfset qTmp=QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=lIndex delimiters=#Chr(10)# cfset i = 0 cfset tmpstart=listLen(lIndex,',') cfset tmp=QueryAddRow(qTmp,listLen(lIndex,',')) cfloop list=#lIndex# index=innerList delimiters=, cfscript tmp=QuerySetCell(qTmp,DateTime, listGetAt(innerList,1)); tmp=QuerySetCell(qTmp,User, listGetAt(innerList,2)); tmp=QuerySetCell(qTmp,Document, listGetAt(innerList,3)); tmp=QuerySetCell(qTmp,Status, listGetAt(innerList,4)); /cfscript cfset i = i + 1 /cfloop /cfloop The listgetat function inside your inner loop is the only change i've made -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 11:16 To: CF-Talk Subject: Looping through a list, setting each listItem to a column Hello Everybody, I am trying to read a log file and display the results on a webpage. Here is what the log file looks. DateTime User Webpage Visited Status 2003/09/01 11:52:15, User\testUser1, /wwwroot/code/article_1.shtml, OK 2003/09/01 11:53:35, User\testUser2, /wwwroot/code/article_2.shtml, OK 2003/09/01 12:04:55, User\testUser3, /wwwroot/code/article_3.shtml, OK 2003/09/01 12:04:58, User\testUser4, /wwwroot/code/article_4.shtml, OK 2003/09/01 12:05:11, User\testUser5, /wwwroot/code/article_5.shtml, OK Here is the code to read the log file cffile action=""> file=C:\myLogFile.log variable=fOutput Take a look at the code below. As you can see I am looping through the list, finding the Carriage Return character. This is all fine, what I want to be able to do is loop through each individual row which is again a comma seprated list (2003/09/01 11:52:15, User\testUser1, /wwwroot/code/article_1.shtml, OK) append each list item in a temp table column. cfset qTmp=QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=lIndex delimiters=#Chr(10)# cfset i = 0 cfset tmpstart=listLen(lIndex,',') cfset tmp=QueryAddRow(qTmp,listLen(lIndex,',')) cfloop list=#lIndex# index=innerList delimiters=, cfscript tmp=QuerySetCell(qTmp,DateTime, innerList); tmp=QuerySetCell(qTmp,User, innerList); tmp=QuerySetCell(qTmp,Document, innerList); tmp=QuerySetCell(qTmp,Status, innerList); /cfscript cfset i = i + 1 /cfloop /cfloop cfquery name=lquery dbtype=query SELECT DISTINCT * FROM qTmp /cfquery The code above is not right, and I've tried hard to figure out how to loop through the inner comma s
Re:Looping through a list, setting each listItem to a column
Have tried but can't crack it. Can you please show me how to do it if you don't mind, thanks in advance. Yes a regular _expression_ (regex) , what you would want is a regex that finds any commas that are between quotation marks and either escapes them or replaces them. I'm no regex expert and that would take me quite a while to figure out, maybe later if youre still stuck. Good luck. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 12:55 To: CF-Talk Subject: Re:Looping through a list, setting each listItem to a column thanks Craig, you've really been of great help. I have another question for you, what I've noticed is a couple of rows are not displayed because the document column has a documnet name with a comma in it. Here is an example. 2003/09/09 14:49:05, TestUser1, /Doc/News/Budgeting,Forecasting Reporting.doc, OK As you can see the document name /Doc/News/Budgeting,Forecasting Reporting.doc has a comma in it. And because our delimeter is , the list finds 4 items. Can you think of any way of getting round this problem. Cheers Allan Had a proper look at it, you actualy only need 1 loop. cfset qTmp = QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=fileLine delimiters=#Chr(10)# cfif listLen(fileLine) eq 4 cfset tmp = QueryAddRow(qTmp,1) cfscript tmp=QuerySetCell(qTmp,DateTime, listGetAt(fileLine,1)); tmp=QuerySetCell(qTmp,User, listGetAt(fileLine,2)); tmp=QuerySetCell(qTmp,Document, listGetAt(fileLine,3)); tmp=QuerySetCell(qTmp,Status, listGetAt(fileLine,4)); /cfscript /cfif /cfloop That should ignore any invalid lines too. -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 11:52 To: CF-Talk Subject: Re:Looping through a list, setting each listItem to a column Yes it does work now, thanks a ton for your speedy help. Cheers This works... cfset qTmp=QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=lIndex delimiters=#Chr(10)# cfset tmp=QueryAddRow(qTmp,1) cfloop list=#lIndex# index=i cfscript tmp=QuerySetCell(qTmp,DateTime, listGetAt(lIndex,1)); tmp=QuerySetCell(qTmp,User, listGetAt(lIndex,2)); tmp=QuerySetCell(qTmp,Document, listGetAt(lIndex,3)); tmp=QuerySetCell(qTmp,Status, listGetAt(lIndex,4)); /cfscript /cfloop /cfloop -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 11:32 To: CF-Talk Subject: Re:Looping through a list, setting each listItem to a column Craig, I tried running your code and get this error, Invalid list index 2. In function ListGetAt(list, index [, delimiters]), the value of index, 2, is not a valid as the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list. Any ideas? Try this.. cfset qTmp=QueryNew(DateTime,User,Document,Status) cfloop list=#fOutput# index=lIndex delimiters=#Chr(10)# cfset i = 0 cfset tmpstart=listLen(lIndex,',') cfset tmp=QueryAddRow(qTmp,listLen(lIndex,',')) cfloop list=#lIndex# index=innerList delimiters=, cfscript tmp=QuerySetCell(qTmp,DateTime, listGetAt(innerList,1)); tmp=QuerySetCell(qTmp,User, listGetAt(innerList,2)); tmp=QuerySetCell(qTmp,Document, listGetAt(innerList,3)); tmp=QuerySetCell(qTmp,Status, listGetAt(innerList,4)); /cfscript cfset i = i + 1 /cfloop /cfloop The listgetat function inside your inner loop is the only change i've made -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 11:16 To: CF-Talk Subject: Looping through a list, setting each listItem to a column Hello Everybody, I am trying to read a log file and display the results on a webpage. Here is what the log file looks. DateTime User Webpage Visited Status 2003/09/01 11:52:15, User\testUser1, /wwwroot/code/article_1.shtml, OK 2003/09/01 11:53:35, User\testUser2, /wwwroot/code/article_2.shtml, OK 2003/09/01 12:04:55, User\testUser3, /wwwroot/code/article_3.shtml, OK 2003/09/01 12:04:58, User\testUser4, /wwwroot/code/article_4.shtml, OK 2003/09/01 12:05:11, User\testUser5, /wwwroot/code/article_5.shtml, OK Here is the code to read the log file cffile action=""> file=C:\myLogFile.log variable=fOutput Take a look at the code below. As you can see I am looping through the list, finding the Carriage Return character. This is all fine, what I want to be able to do is loop through each individual row which is again a comma seprated list (2003/09/01 11:52:15, User\testUser1, /wwwroot/code/article_1.shtml, OK) append each list item in a temp
Re:Help with Regular Expressions
Hi Ben Actually if you take a look at this thread you will get a better idea of what I'm trying to do. I'll appreciate your help http://www.houseoffusion.com/cf_lists/index.cfm/method=messagesthreadid=27743forumid=4 Thanks The problem is in defining between quotation marks because technically in testuser1,testuser2 the comma *is* between quotation marks.I can see how you could loop over the string and keep the pairs consistent that way, but I can't off the top of my head think of a way to do it with a single regex. Here's another way to look at it: you have a quotation-mark-delimited list with throwaway members that just contain commas. I don't know if that will be the right way to go about it, but it might be worth considering. If not, I would use a find() to locate all the quotes and work with them in pairs that way, removing/replacing commas between them. HTH. --Ben Doom Allan Clarke wrote: I want to use a regular _expression_ that finds any commas that are between quotation marks and either escapes them or replaces them Here is an my string. 2003/09/09 14:49:05, TestUser1, /Doc/News/Budgeting,Forecasting Reporting.doc, OK As you can see /Doc/News/Budgeting,Forecasting Reporting.doc has a comma in it. The example above is a list with 4 items: 2003/09/09 14:49:05 TestUser1 /Doc/News/Budgeting,Forecasting Reporting.doc OK But because the string (/Doc/News/Budgeting,Forecasting Reporting.doc) has a comma the list len comes back with 5 items which is wrong. Can you show me how to get around this? Many Thanks __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Looping through a list, setting each listItem to a column
I've tried that and it does not work. Here is my code cfscript myList = '2003/09/09 14:49:05, TestUser1, /Doc/News/Budgeting,Forecasting Reporting.doc, OK'; myList = REReplace(myList, '^[[:space:]]*([^,]*|([^]|)*)[[:space:]]*(,|$)',''); /cfscript cfoutput#myList#/cfoutput This should do it in CF using regexp. There are probably custom tags that will read logs more efficiently though. cfscript columns = DateTime,User,Document,Status; qTmp = QueryNew(columns); pattern = '^[[:space:]]*([^,]*|([^]|)*)[[:space:]]*(,|$)'; matchStruct = structNew(); for(i=2;i LE ListLen(fOutput,chr(10));i=i+1){ QueryAddRow(qTmp,1); line = ListGetAt(fOutput,i,chr(10)); exit = false; j = 1; while(NOT exit){ // find matching pattern matchStruct = REFindNoCase(pattern,line,1,true); if(matchStruct.pos[1] AND j LE ListLen(columns)){ field = Mid(line,matchStruct.pos[2],matchStruct.len[2]); QuerySetCell(qTmp,ListGetAt(columns,j),field); if(matchStruct.len[1]) line = RemoveChars(line,1,matchStruct.len[1]); j = j + 1; } else exit = true; } } /cfscript -Oorspronkelijk bericht- Van: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Verzonden: wo 8/10/2003 15:53 Aan: CF-Talk CC: Onderwerp: Re:Looping through a list, setting each listItem to a column Have tried but can't crack it. Can you please show me how to do it if you don't mind, thanks in advance. Yes a regular _expression_ (regex) , what you would want is a regex that finds any commas that are between quotation marks and either escapes them or replaces them. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Help with Regular Expressions
Thanks Ben, the problem with that script is that because I'm reading a log file with 300 plus rows of data, the execution time suffers. Is there a way to only run your code if somewhere in the string there is a comma inside double quotes? Try this: cfset string = '11/12/2003, bob, this is a ,comma,list,end' cfscript string = string ,; first = find('', string); second = find('', string, first + 1); while(first and second) { string = left(string, first) replace(mid(string, first + 1, second-first), ',', '~', all) right(string, len(string) - second); first = find('', string, second + 1); second = find('', string, first + 1); } /cfscript You'll notice that I append a comma to the end of the list.This is so that a double-quote can't be the last character.Sine CF ignores empty list entries, this shouldn't affect the rest of your code.If it does, just strip the last character at the end of the script. HTH. --Ben Doom [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Error when trying to create a datasource from the CFMX Administrator
yes I have recently upgraded to 6.1 from updater 3. I entered a new datasource name, selected Microsoft SQL Server from the driver drop-down, entered the database, server, login, password details and on hitting the submit button I get the error. I did what you asked me to, deleting all the class files from the cfusionmx\web-inf\cfclasses folder and restarted all the cf services, I still get the error. Did you recently upgrade the server to a different version of CF? I saw a couple of people reporting this after the 6.1...I don't know how it was resolved, but if the old compiled class files for those admin pages are still hanging around and this isJ2EE function didn't exist previously, that could be the problem. If so, restarting the service and making sure cfusionmx\web-inf\cfclasses is empty of files should clear the problem up. -- jon mailto:[EMAIL PROTECTED] Wednesday, September 3, 2003, 10:19:17 AM, you wrote: CP SQL Server What kind of database? -- jon mailto:[EMAIL PROTECTED] Wednesday, September 3, 2003, 9:55:40 AM, you wrote: AC I get this error when I try to create a data source AC from the CFMX Administrator. AC Element ISJ2EE is undefined in DS. AC The error occurred in AC D:\CFusionMX\wwwroot\CFIDE\administrator\datasources\index.cfm: AC line 448 AC Called from AC D:\CFusionMX\wwwroot\CFIDE\administrator\datasources\index.cfm: AC line 434 AC Called from AC D:\CFusionMX\wwwroot\CFIDE\administrator\datasources\index.cfm: AC line 371 AC Called from AC D:\CFusionMX\wwwroot\CFIDE\administrator\datasources\index.cfm: AC line 1 AC Can somebody please tell me how to correct this AC __ AC Do you Yahoo!? AC Yahoo! SiteBuilder - Free, easy-to-use web site design software AC http://sitebuilder.yahoo.com AC CP ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
Error when trying to create a datasource from the CFMX Administrator
SQL Server What kind of database? -- jon mailto:[EMAIL PROTECTED] Wednesday, September 3, 2003, 9:55:40 AM, you wrote: AC I get this error when I try to create a data source AC from the CFMX Administrator. AC Element ISJ2EE is undefined in DS. AC The error occurred in AC D:\CFusionMX\wwwroot\CFIDE\administrator\datasources\index.cfm: AC line 448 AC Called from AC D:\CFusionMX\wwwroot\CFIDE\administrator\datasources\index.cfm: AC line 434 AC Called from AC D:\CFusionMX\wwwroot\CFIDE\administrator\datasources\index.cfm: AC line 371 AC Called from AC D:\CFusionMX\wwwroot\CFIDE\administrator\datasources\index.cfm: AC line 1 AC Can somebody please tell me how to correct this AC __ AC Do you Yahoo!? AC Yahoo! SiteBuilder - Free, easy-to-use web site design software AC http://sitebuilder.yahoo.com AC ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Special Characters - Display Issue - CF 5
I really don't know how if at all to change it. I must admit I don't know a lot about character sets. I even more confused now then I was before. You suggested in your previous thread that I should be using the charset ISO-88659-15 and not utf-8. I did what you said and added this line of code in my application.cfm file: meta http-equiv=Content-Type content=text/html; charset=ISO-88659-15 This is how the organisation name is displayed: Crédit FrÃnce When I change the charset to utf-8, the organisation name is displayed correctly: Crédit FrÄnce You were suggesting that I use the charset ISO-88659-15, but by including this in the meta tag, the output seen on the browser is not right. I am dependent on your help, kindly help. ColdFusion Programmer wrote: I'm not sure mate, probably utf-8 We already established that. But can you change it? Jochem ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
Special Characters - Display Issue - CF 5
no I can't change the charset in LDAP. I've had a look. ColdFusion Programmer wrote: You suggested in your previous thread that I should be using the charset ISO-88659-15 and not utf-8. I did what you said and added this line of code in my application.cfm file: meta http-equiv=Content-Type content=text/html; charset=ISO-88659-15 This is how the organisation name is displayed: Crédit FrÄnce The problem is that you are not using ISO-8859-15. You still have UTF-8 in your template, but you tell the browser that you are using ISO-8859-15. You need to change the actual encoding in your templates, in the LDAP and in your databases to be identical. Only then you can tell the browser that what you send him uis ISO-8859-15. So we are back to the question: can you change the charset that the LDAP server uses? Not the charset you send to the browser, but the charset in the LDAP. Jochem ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Special Characters - Display Issue - CF 5
I added the meta tag in my application.cfm file and to my surprise it displays the bank name correctly: Crédit France. Is it safe/ok to add this code in my application.cfm file? Will I have any problems with blank pages or content display in the browser? meta http-equiv=Content-Type content=text/html; charset=utf-8 Allan Clarke wrote: I don't know how to escape special characters and display them in HTML Safe Format. This is a french banking application and there are banks with funny names, ex: Crédit France, Zürcher Kantonalbank, è, Ä, acute and the like. The bank Crédit France gets displayed like this on the browser: Crédit France. Somewhere in your application you are using UTF-8. CF 5 is not unicode capable. You could do a replace step and then use htmleditformat(), but you should consider upgrading to CF MX so you can use native unicode. Jochem ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com
Special Characters - Display Issue - CF 5
my client does not want to migrate ot MX just yet. I don't know another way to display french/foreign characters in CF5 other then using the meta tag. If I don't use the meta tag the content screws up or in other words the foreign characters get displayed. But when I view the source on the browser the content appears as it should do. Why then does it not get displayed properly? Can anyone tell me how to get round this problem. I added the meta tag in my application.cfm file and to my surprise it displays the bank name correctly: Crédit France. Is it safe/ok to add this code in my application.cfm file? Will I have any problems with blank pages or content display in the browser? meta http-equiv=Content-Type content=text/html; charset=utf-8 if you really have utf-8 in a db via cf5 you will be hurting when you move to mx. you should try to straighten this out now. while using unicode is always a good idea, for french w/cf5, its not required (and not really a good idea). ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
Special Characters - Display Issue - CF 5
actually I did have a play with that udf but it does'nt convert western european characters to html safe characters. Take a look at this on CFLIB to see it will help you. http://www.cflib.org/udf.cfm?ID=833 Kind Regards - Mike Brunt Webapper Services LLC Web Site http://www.webapper.com Blog http://www.webapper.net Webapper Web Application Specialists -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 9:08 AM To: CF-Talk Subject: Special Characters - Display Issue - CF 5 my client does not want to migrate ot MX just yet. I don't know another way to display french/foreign characters in CF5 other then using the meta tag. If I don't use the meta tag the content screws up or in other words the foreign characters get displayed. But when I view the source on the browser the content appears as it should do. Why then does it not get displayed properly? Can anyone tell me how to get round this problem. I added the meta tag in my application.cfm file and to my surprise it displays the bank name correctly: CrÃ(c)dit France. Is it safe/ok to add this code in my application.cfm file? Will I have any problems with blank pages or content display in the browser? meta http-equiv=Content-Type content=text/html; charset=utf-8 if you really have utf-8 in a db via cf5 you will be hurting when you move to mx. you should try to straighten this out now. while using unicode is always a good idea, for french w/cf5, its not required (and not really a good idea). ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Special Characters - Display Issue - CF 5
here is what I want to do. I have the users in an LDAP Server. If I create an organisation with a special character say é, when displayed on the web page I see the funny charactes. I have now understood that adding the meta tag with utf charset in the application.cfm file can lead to unexpected results. I know there are only a couple of templates in my application that display the organisation name, and the only character that I want to escape is the acute (é), how can I avoid using the meta tag and in its place use something that does the job, I've tried the htmlSafe() udf but that does not display it correctly, is there a inbuilt CF function, I've tried the HTMLEditFormat(). Can you please show me how to do this. Best Regards, Allan There is nothing wrong with the meta tag. It is the charset you are using which is wrong. All French characters are covered in ISO-88659-15, and CF 5 supports that. So it would be wise to use ISO-8859-15 instead of UTF-8 so you don't end up with garbage in your database. as i said, the use of unicode w/cf5 in this case isn't required. and jochem's got a very good point, that he's not mentioning, in suggesting ISO-8859-15, the euro symbol. ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
Special Characters - Display Issue - CF 5
I'm not sure mate, probably utf-8 ColdFusion Programmer wrote: here is what I want to do. I have the users in an LDAP Server. Can you specify the charset the LDAP server uses? Jochem ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
See a blank page when I run a .cfm file
Can somebody please tell me how to fix this? I have this strange problem. I'm running coldfusion MX on my Win2k server and IIS 5.0. For some reason when I run a .cfm file on my localhost: http://localhost/test.cfm, all I see is a BLANK Page. When I view the source, I see this: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252 script LANGUAGE=JAVASCRIPT TYPE=text/javascript !-- function _CF_onError(form_object, input_object, object_value, error_message) { alert(error_message); return false; } function _CF_hasValue(obj, obj_type) { if (obj_type == TEXT || obj_type == PASSWORD) { if (obj.value.length == 0) return false; else return true; } else if (obj_type == SELECT) { for (i=0; i obj.length; i++) { if (obj.options[i].selected) return true; } return false; } else if (obj_type == SINGLE_VALUE_RADIO || obj_type == SINGLE_VALUE_CHECKBOX) { if (obj.checked) return true; else return false; } else if (obj_type == RADIO || obj_type == CHECKBOX) { for (i=0; i obj.length; i++) { if (obj[i].checked) return true; } return false; } } function _CF_checkCFForm_1(_CF_this) { if (!_CF_hasValue(_CF_this.Subject, TEXT )) { if (!_CF_onError(_CF_this, _CF_this.Subject, _CF_this.Subject.value, Error in Subject text.)) { return false; } } return true; } //-- /script /HEAD BODY/BODY/HTML I can't run cf administrator or call any ColdFusion File. I don't know what's happenning, it was all working last week. I've checked the IIS App Mappings, and I see the .cfm, .cfc, .cfml and .jsp application mappings for my default website. I can run a .html and a .asp file, its just coldfusion. Can somebody tell me how to fix this problem. I'm just stranded and don't know what to do. Cheers Allan __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
See a blank page when I run a .cfm file
yes it is still running, I've even restarted my services a couple of times, it doesn't seem to parse the coldfusion code or anything for that matter. ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
See a blank page when I run a .cfm file
No, this is not the file I'm trying to execute. I see this code on every coldfusion page. If I run the coldfusion administrator (http://127.0.0.1/cfide/administrator/index.cfm), I see a blank page and this code when I view the source. I see this code for each and every coldfusion file I try to run on the browser. So I don't know what's happenning. I have a strong feeling this is a IIS related problem, but don't know how to fix it. ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com
See a blank page when I run a .cfm file
yes I've checked all coldfusion app mappings are there in the IIS Default website. ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
See a blank page when I run a .cfm file
I was having this problem with CFMX with Updater 3 installed, I updated to CFMX 6.1 (Redsky) and still see a blank page when I run a .cfm file on a browser. This is what I'm trying to do: .cfm file - cfset myName = TestUser This is a test cfoutput#myName#/cfoutput -- When I run this file on the browser I see a blank page. When I view the source I see this: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML Just found this thread on the Macromedia Forums which dates back to 19 Dec 2002. http://webforums.macromedia.com/coldfusion/messageview.cfm?catid=3threadid=517462highlight_key=ykeyword1=blank%20pagekeyword2=browser The problem is still there.. ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com
See a blank page when I run a .cfm file
I was having this problem with CFMX with Updater 3 installed, I updated to CFMX 6.1 (Redsky) and still see a blank page when I run a .cfm file on a browser. This is what I'm trying to do: .cfm file - cfset myName = TestUser This is a test cfoutput#myName#/cfoutput -- When I run this file on the browser I see a blank page. When I view the source I see this: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML Just found this thread on the Macromedia Forums which dates back to 19 Dec 2002. http://webforums.macromedia.com/coldfusion/messageview.cfm?catid=3threadid=517462highlight_key=ykeyword1=blank%20pagekeyword2=browser The problem is still there.. ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
See a blank page when I run a .cfm file
I was having this problem with CFMX with Updater 3 installed, I updated to CFMX 6.1 (Redsky) and still see a blank page when I run a .cfm file on a browser. This is what I'm trying to do: .cfm file - cfset myName = TestUser This is a test cfoutput#myName#/cfoutput -- When I run this file on the browser I see a blank page. When I view the source I see this: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML Just found this thread on the Macromedia Forums which dates back to 19 Dec 2002. http://webforums.macromedia.com/coldfusion/messageview.cfm?catid=3threadid=517462highlight_key=ykeyword1=blank%20pagekeyword2=browser; The problem is still there.. ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
See a blank page when I run a .cfm file
I was having this problem with CFMX with Updater 3 installed, I updated to CFMX 6.1 (Redsky) and still see a blank page when I run a .cfm file on a browser. This is what I'm trying to do: .cfm file - cfset myName = TestUser This is a test cfoutput#myName#/cfoutput -- When I run this file on the browser I see a blank page. When I view the source I see this: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com
See a blank page when I run a .cfm file
I was having this problem with CFMX with Updater 3 installed, I updated to CFMX 6.1 (Redsky) and still see a blank page when I run a .cfm file on a browser. This is what I'm trying to do: - cfset myName = TestUser This is a test cfoutput#myName#/cfoutput -- When I run this file on the browser I see a blank page. When I view the source I see this: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML Just found this thread on the Macromedia Forums which dates back to 19 Dec 2002. http://webforums.macromedia.com/coldfusion/messageview.cfm?catid=3threadid=517462highlight_key=ykeyword1=blank%20pagekeyword2=browser The problem is still there.. ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com
See a blank page when I run a .cfm file
I can't get to the ColdFusion Administrator, I have clearly mentioned in my previous posts, I can't browse coldfusion pages. I just see a blank page. ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
See a blank page when I run a .cfm file
It wasn't intentional. I just kept getting a javascript error when trying to submit my message, I'm sorry guys ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com
calculating the date and time.
How do I get the calculate the from time to start at 01:00 am and the to time to end at 00:59 am. Can you please show me how to get the date and time in the format mentioned below In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59) I was hoping somebody could help me. I'm trying to display the date and time. This is how I want to display it: If the current time is 10:05, I want to display the time in this format: In the last hour (09:05 - 10:04) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003 00:59) Look into DateAdd() - you can add any amount of time to a date, from seconds to years If you want to remove 7 days, you can just do DateAdd(d, -7, Now()) Hope this helps ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
[cftalk] calculating the date and time.
Spot on Allan, this is what I was trying to do. Can you show me how to calclulate the from-to date time in the last 24 hours In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59) Many Thanks Allan CFIF LookingAt IS Week CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,59, 0) CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today)) /CFIF I haven't tested this so there maybe small errors but something like this?? - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Wednesday, July 30, 2003 12:24 PM Subject: [cftalk] calculating the date and time. How do I get the calculate the from time to start at 01:00 am and the to time to end at 00:59 am. Can you please show me how to get the date and time in the format mentioned below In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59) I was hoping somebody could help me. I'm trying to display the date and time. This is how I want to display it: If the current time is 10:05, I want to display the time in this format: In the last hour (09:05 - 10:04) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003 00:59) Look into DateAdd() - you can add any amount of time to a date, from seconds to years If you want to remove 7 days, you can just do DateAdd(d, -7, Now()) Hope this helps ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
[cftalk] calculating the date and time.
not quite as I was expecting. Take the current time, its 11:55 am GMT, I want the result to be (29 Jul 2003 11:00 - 30 Jul 2003 10:59) CFIF LookingAt IS Day CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59, 0) CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today)) /CFIF - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Wednesday, July 30, 2003 12:48 PM Subject: [cftalk] calculating the date and time. Spot on Allan, this is what I was trying to do. Can you show me how to calclulate the from-to date time in the last 24 hours In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59) Many Thanks Allan CFIF LookingAt IS Week CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0, 59, 0) CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today)) /CFIF I haven't tested this so there maybe small errors but something like this?? - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Wednesday, July 30, 2003 12:24 PM Subject: [cftalk] calculating the date and time. How do I get the calculate the from time to start at 01:00 am and the to time to end at 00:59 am. Can you please show me how to get the date and time in the format mentioned below In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59) I was hoping somebody could help me. I'm trying to display the date and time. This is how I want to display it: If the current time is 10:05, I want to display the time in this format: In the last hour (09:05 - 10:04) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003 00:59) Look into DateAdd() - you can add any amount of time to a date, from seconds to years If you want to remove 7 days, you can just do DateAdd(d, -7, Now()) Hope this helps ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
[cftalk] calculating the date and time.
Thank you Allan for helping me out with this, I know this is stuff I should be doing, I just don't have the time to put my focus on this, am doing multiple tasks at the same time. Appreciate your comments Phillip but as I say having to work under a lot of stress Thanks guys It is just a matter of paying with the individual time values to get what you need. The hour is always 59 minutes past the current hour minus 1. CFIF LookingAt IS Day CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()), Hour(DateAdd(H,-1,Now(,59,0) CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today)) /CFIF - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Wednesday, July 30, 2003 1:00 PM Subject: [cftalk] calculating the date and time. not quite as I was expecting. Take the current time, its 11:55 am GMT, I want the result to be (29 Jul 2003 11:00 - 30 Jul 2003 10:59) CFIF LookingAt IS Day CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9, 59, 0) CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today)) /CFIF - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Wednesday, July 30, 2003 12:48 PM Subject: [cftalk] calculating the date and time. Spot on Allan, this is what I was trying to do. Can you show me how to calclulate the from-to date time in the last 24 hours In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59) Many Thanks Allan CFIF LookingAt IS Week CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0, 59, 0) CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today)) /CFIF I haven't tested this so there maybe small errors but something like this?? - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Wednesday, July 30, 2003 12:24 PM Subject: [cftalk] calculating the date and time. How do I get the calculate the from time to start at 01:00 am and the to time to end at 00:59 am. Can you please show me how to get the date and time in the format mentioned below In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59) I was hoping somebody could help me. I'm trying to display the date and time. This is how I want to display it: If the current time is 10:05, I want to display the time in this format: In the last hour (09:05 - 10:04) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59) If the current time is 10:05 and the date is 30.July, I want to display the date time in this format: In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003 00:59) Look into DateAdd() - you can add any amount of time to a date, from seconds to years If you want to remove 7 days, you can just do DateAdd(d, -7, Now()) Hope this helps ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SiteMinder Service Status
Can you please provide more details? Allan Clarke wrote: Does anyone know how to programatically test if the SiteMinder Authentication/Authorization service is running. I'm currently using the cfauthenticate tag to do this but even after stopping the services ColdFusion thinks SiteMinder is still running, I guess because coldfusion caches the SiteMinder policy. I want my ColdFusion script to be able to correctly display the SiteMinder service status. Is there a way other than using the cfauthenticate tag to test if the SiteMinder service is running. BTW I'm using CF5 Use cfexecute + list.exe from the Windows NT Resource Kit to list all running processes. Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SiteMinder Service Status
Can you please show me how to do implemet this? Regards Allan Allan Clarke wrote: Does anyone know how to programatically test if the SiteMinder Authentication/Authorization service is running. I'm currently using the cfauthenticate tag to do this but even after stopping the services ColdFusion thinks SiteMinder is still running, I guess because coldfusion caches the SiteMinder policy. I want my ColdFusion script to be able to correctly display the SiteMinder service status. Is there a way other than using the cfauthenticate tag to test if the SiteMinder service is running. BTW I'm using CF5 Use cfexecute + list.exe from the Windows NT Resource Kit to list all running processes. Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SiteMinder Service Status
Thanks Jochem for the code, however I can't find the file list.exe or the folder resource kit. I've got W2K Server installed on my pc. Any ideas? ColdFusion Programmer wrote: Can you please provide more details? cfsavecontent name=processList cfexecute name=c:\program files\resource kit\list.exe timeout=2/cfexecute /cfsavecontent cfset isRunning = Find(siteminder executable, processList) Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SiteMinder Service Status
I installed the support tools from the win2k CD. Passed the correct path to the cfexecute tag. cfsavecontent variable=processList cfexecute name=c:\program files\support tools\tlist.exe timeout=2/cfexecute /cfsavecontent cfoutput#processList#/cfoutput cfset isRunning = Find(SiteMinder executable, #processList#) cfoutput#isRunning#/cfoutput processList outputs nothing. isRunning always returns 0 even when the SiteMinder service is started. Any ideas why this is happenning? Jochem van Dieten wrote: ColdFusion Programmer wrote: Thanks Jochem for the code, however I can't find the file list.exe or the folder resource kit. I've got W2K Server installed on my pc. Any ideas? Sorry, should be tlist.exe. It is in the Resource Kit. Actually, with Win2K it is on the CD under /support/tools. You should check out the other goodies there as well. Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SiteMinder Service Status
yes I do get the right output when I run it from the command line. I don't know why I don't see any output when I run the code. ColdFusion Programmer wrote: I installed the support tools from the win2k CD. Passed the correct path to the cfexecute tag. cfsavecontent variable=processList cfexecute name=c:\program files\support tools\tlist.exe timeout=2/cfexecute /cfsavecontent cfoutput#processList#/cfoutput cfset isRunning = Find(SiteMinder executable, #processList#) cfoutput#isRunning#/cfoutput processList outputs nothing. Do you get the right output if you run tlist from the command line? Because it does work for me: http://145.94.154.26/tlist.cfm (with the cfsavecontent stripped) Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SiteMinder Service Status
Can you paste the code that works for you (tList.cfm)? ColdFusion Programmer wrote: I installed the support tools from the win2k CD. Passed the correct path to the cfexecute tag. cfsavecontent variable=processList cfexecute name=c:\program files\support tools\tlist.exe timeout=2/cfexecute /cfsavecontent cfoutput#processList#/cfoutput cfset isRunning = Find(SiteMinder executable, #processList#) cfoutput#isRunning#/cfoutput processList outputs nothing. Do you get the right output if you run tlist from the command line? Because it does work for me: http://145.94.154.26/tlist.cfm (with the cfsavecontent stripped) Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SiteMinder Service Status
It finally worked. Not on my system though. I copied the files to another system and it worked. I do see a list of services that are running on the server. However, what happenns if the SitMinder service crashes unexpectedly, and as you might know this happenns very often. Would tList.exe still list the service? My guess is it would, because the SiteMinder Authentication/Authorization service status would still be started even though the service has crashed. I need a script to monitor the siteMinder services and send alerts when the service is not responding. My current solution is to use the cfauthenticate coldfusion tag. The script calls the tag and returns a success or failure message. However, I've noticed that even after stopping the SiteMinder services(s), the status message does not change to failed, that's because coldfusion caches the SiteMinder service cache. Flushing the cache would slow down the performance, but how else can I get the upto the minute status of the service? I would really appreciate your help ColdFusion Programmer wrote: Can you paste the code that works for you (tList.cfm)? precfexecute name=c:\program files\support tools\tlist.exe timeout=2 arguments=-s/cfexecute/pre cfabort Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
How to Flush ColdFusion and Security Server Caches Programatically?
Can somebody please show me how to do this? Hi all, I'm using ColdFusion 5 and Advanced Security. I want to be able to flush the SiteMinder Authorization and Authentication Caches. The way I do it now is by going to the CF Admin - Security Configuration and then click on the Flush All button. I want to know if it is possible to use some coldfusion tag to do this programatically. I'll appreciate your help. Regards Allan __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Coldfusion MX installer problem - Please help
I modified the CFMX_Upgraded key in the registry HKEY_LOCAL_MACHINE/SOFTWARE/Allaire/Install Data/ColdFusion 5.0/CFMX_Upgraded and set the value to no. I can now see the message window giving me the option to co-exist or upgrade. I want to upgrade to MX. After selecting the upgrade option and clicking on Next, a message window pops up informing me that the installer is Backing up files and folders. I'm stuck here, I don't see anything happenning for mins. I don't know what to do, is there a workaround to fix this? I would really appreciate your help Many Thanks, Allan ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Coldfusion MX installer problem - Please help
Win 2000 Server ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Coldfusion MX installer problem - Please help
If I reboot my box, I'll have to again modify my registry and have a feeling that I will land up in the same situation. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4