Can you please forward the link to the website where you saw this example? I am trying to picture in my head what information you want to display, but can't seem to 'grasp' it.
I am sure you know this already, but just in case: JavaScript is a 'client-side' scripting language (this means that it is run and processed by the browser once the page has been loaded). CFscript a 'server-side' programming language that is run on the server before the browser receives the page. CFscript is another syntax style that can be used instead of and 'mixed in' with the coldfusion tag based system. Eg. <cfset days = new Array(Sunday,"Monday,"Tuesday","Wednesday, "Thursday,"Friday, "Saturday")> Does basically the same thing as: <cfscript> days = new Array(Sunday,"Monday,"Tuesday","Wednesday, "Thursday,"Friday, "Saturday"); </cfscript> However, neither one of them will be visible or accessible inside of the browser after the page has been loaded. William ---------------------------------- William Seiter ColdFusion Web Developer / Consultant http://william.seiter.com Have you ever read a book that changed your life? Go to: <a href="www.winninginthemargins.com">www.winninginthemargins.com</a> Use PassKey: GoldenGrove You'll be glad you did. ::-----Original Message----- ::From: John Barrett [mailto:[EMAIL PROTECTED] ::Sent: Friday, April 11, 2008 6:46 PM ::To: CF-Newbie ::Subject: cf script :: ::Hi, ::I am trying to convert a javaScript code to show "This page was last ::updated on" with cf script. The two reasons are the javaScript does not ::work in all browsers, and I want to learn cf script. :: ::Besides the cf docs, are there other resources out there? :: ::below is the script, that I am trying to convert. ::Thanks so much for any help that you may be able to offer ::John :: ::I think that I can use this to set the arrays: ::<cfscript> ::myArray = arrayNew(1); ::myArray[1] = 'Monday'; ::... ::... ::... :: </cfscript> ::The first item in the array is: #myArray[1]# :: ::<JS Script> ::var days = new Array(8); :: days[1] = "Sunday"; :: days[2] = "Monday"; :: days[3] = "Tuesday"; :: days[4] = "Wednesday"; :: days[5] = "Thursday"; :: days[6] = "Friday"; :: days[7] = "Saturday"; ::var months = new Array(13); :: months[1] = "January"; :: months[2] = "February"; :: months[3] = "March"; :: months[4] = "April"; :: months[5] = "May"; :: months[6] = "June"; :: months[7] = "July"; :: months[8] = "August"; :: months[9] = "September"; :: months[10] = "October"; :: months[11] = "November"; :: months[12] = "December"; ::var dateObj = new Date(document.lastModified) ::var wday = days[dateObj.getDay() + 1] ::var lmonth = months[dateObj.getMonth() + 1] ::var date = dateObj.getDate() ::var fyear = dateObj.getYear() ::if (fyear < 2000) :: fyear = fyear + 1900 :: document.write(wday + ", " + lmonth + " " + date + ", " + fyear) :: :: :: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3564 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
