setting cf var with javascript

2010-02-05 Thread Keith McGee
How do you set a CF variable with a java script variable. I have a script that adds three weekdays to the current day, document.write(mydate) and I want to set this to a CF variable cfset mydate = document.write(mydate) any suggestions Keith

RE: setting cf var with javascript

2010-02-05 Thread Robert Harrison
...@frontiernet.net] Sent: Friday, February 05, 2010 11:40 AM To: cf-talk Subject: setting cf var with javascript How do you set a CF variable with a java script variable. I have a script that adds three weekdays to the current day, document.write(mydate) and I want to set this to a CF variable

Re: setting cf var with javascript

2010-02-05 Thread William Seiter
There is a misunderstanding about how the coldfusion works with JavaScript, I think. On the server, the coldfusion is translated to pure HTML and Javascript (or any language that is 'client side'). Once the page is delivered to the browser, there is no coldfusion left on the page. This

Re: setting cf var with javascript

2010-02-05 Thread Keith McGee
I'm looking to add three work days to the current date. set this in a var and update the record in the database. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing

Re: setting cf var with javascript

2010-02-05 Thread Yuliang Ruan
I'm looking to add three work days to the current date. set this in a var and update the record in the database. after the JS actions of adding work days, the JS would need to submit the new data back to a CFM/CFC to be processed as a form, url, or function argument to update into the db.

Re: setting cf var with javascript

2010-02-05 Thread Martin Franklin
: setting cf var with javascript I'm looking to add three work days to the current date. set this in a var and update the record in the database. after the JS actions of adding work days, the JS would need to submit the new data back to a CFM/CFC to be processed as a form, url, or function

RE: setting cf var with javascript

2010-02-05 Thread Robert Harrison
I'm looking to add three work days to the current date. set this in a var and update the record in the database. Unless you need to base that date on clients system date you don't need any java script. If you use the server date you can do that totally in CF using the date functions. Robert

Re: setting cf var with javascript

2010-02-05 Thread Keith McGee
this is what I wanted to do, Thanks I figured it out cfoutput cfset ThisDate = now() cfset WorkingDays = 0 cfloop from=1 to=5 index=i cfset ThisDate = DateAdd('d', 1, ThisDate) cfif DayOfWeek(ThisDate) GT 1 AND DayOfWeek(ThisDate) LT 7 cfset WorkingDays = WorkingDays + 1 cfif WorkingDays EQ 3

Re: setting cf var with javascript

2010-02-05 Thread Martin Franklin
Kule, but I'd move the starting cfoutput tag, no need to wrap your logic in it:) - Original Message - From: Keith McGee kpmc...@frontiernet.net To: cf-talk cf-talk@houseoffusion.com Sent: Friday, February 05, 2010 12:09 PM Subject: ***SPAM*** Re: setting cf var with javascript