Re: Java Script Value to CF Value
That script won't work, as the CF code will already be executed before the client-side Javascript does anything. CF might be able to write to Javascript but can't read it. Robert Harrison wrote: I have a value I'm retrieving from Java Script. I need to set it to a CF value. What is the correct syntax. Below does not work, but it makes the point on what I'm trying to do. How do I do this correctly? cfset wide=script language='javascript'document.write(document.images[0].height)/script Thanks, Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287684 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Java Script Value to CF Value
You'll need two pages or steps to get this value - one for the form itself, then when you submit that form you can have the value. form action=mypage.cfm input type=hidden name=wide /form script language=JavaScript document.forms[0].wide.value = document.images[0].height; document.forms[0].submit(); /script Robert Harrison wrote: I have a value I'm retrieving from Java Script. I need to set it to a CF value. What is the correct syntax. Below does not work, but it makes the point on what I'm trying to do. How do I do this correctly? cfset wide=script language='javascript'document.write(document.images[0].height)/script Thanks, Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287683 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Java Script Value to CF Value
Robert, Look at the docs for toScript(), this function will help you out. Dan On 9/4/07, Robert Harrison [EMAIL PROTECTED] wrote: I have a value I'm retrieving from Java Script. I need to set it to a CF value. What is the correct syntax. Below does not work, but it makes the point on what I'm trying to do. How do I do this correctly? cfset wide=script language='javascript'document.write(document.images[0].height)/script Thanks, Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287685 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Java Script Value to CF Value
I see the error of my ways. I'm missing client sided variables with server sided variables... oh well, back to the drawing board. Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . -Original Message- From: Ryan Stille [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 04, 2007 9:45 AM To: CF-Talk Subject: Re: Java Script Value to CF Value You'll need two pages or steps to get this value - one for the form itself, then when you submit that form you can have the value. form action=mypage.cfm input type=hidden name=wide /form script language=JavaScript document.forms[0].wide.value = document.images[0].height; document.forms[0].submit(); /script Robert Harrison wrote: I have a value I'm retrieving from Java Script. I need to set it to a CF value. What is the correct syntax. Below does not work, but it makes the point on what I'm trying to do. How do I do this correctly? cfset wide=script language='javascript'document.write(document.images[0].height)/script Thanks, Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287686 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Java Script Value to CF Value
Robert, I couldn't really get a feel for what you're doing but take a look at two options: 1) Doing an XHR called (Ajax) to a CF template to set it and do any work necessary. 2) Look into WDDX to help you exchange JS native data elements between CF. http://www.webmonkey.com/webmonkey/99/15/index3a_page4.html?tw=authoring Rey... David Low wrote: That script won't work, as the CF code will already be executed before the client-side Javascript does anything. CF might be able to write to Javascript but can't read it. Robert Harrison wrote: I have a value I'm retrieving from Java Script. I need to set it to a CF value. What is the correct syntax. Below does not work, but it makes the point on what I'm trying to do. How do I do this correctly? cfset wide=script language='javascript'document.write(document.images[0].height)/script Thanks, Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287687 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Java Script Value to CF Value
But that is for passing CF values into Javascript, isn't it? Robert is trying to get a client-side JS value (which is defined once an image has loaded) into the server-side CF code. Can't be done in that way. Robert, what is it you're trying to do in general, aside from the snippet of code you gave? Dan Vega wrote: Robert, Look at the docs for toScript(), this function will help you out. Dan On 9/4/07, Robert Harrison [EMAIL PROTECTED] wrote: I have a value I'm retrieving from Java Script. I need to set it to a CF value. What is the correct syntax. Below does not work, but it makes the point on what I'm trying to do. How do I do this correctly? cfset wide=script language='javascript'document.write(document.images[0].height)/script Thanks, Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287688 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Java Script Value to CF Value
But that is for passing CF values into Javascript, isn't it? Robert is trying to get a client-side JS value (which is defined once an image has loaded) into the server-side CF code. Can't be done in that way. Robert, what is it you're trying to do in general, aside from the snippet of code you gave? Dan Vega wrote: Robert, Look at the docs for toScript(), this function will help you out. Dan On 9/4/07, Robert Harrison [EMAIL PROTECTED] wrote: I have a value I'm retrieving from Java Script. I need to set it to a CF value. What is the correct syntax. Below does not work, but it makes the point on what I'm trying to do. How do I do this correctly? cfset wide=script language='javascript'document.write(document.images[0].height)/script Thanks, Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287689 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Java Script Value to CF Value
ALTERNATE METHOD: I can read the file using CFFILE. If it is an image file is there some way I can get the width and height? Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287690 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Java Script Value to CF Value
Man, just do an ajax call with your client side variable as a url parameter (or post if you want to get fancy) and have CF process that and save it as a var... I think you are trying to over-complicate it ;) Chris Peterson Gainey IT Adobe Certified Advanced Coldfusion Developer -Original Message- From: Robert Harrison [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 04, 2007 9:51 AM To: CF-Talk Subject: RE: Java Script Value to CF Value I see the error of my ways. I'm missing client sided variables with server sided variables... oh well, back to the drawing board. Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . -Original Message- From: Ryan Stille [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 04, 2007 9:45 AM To: CF-Talk Subject: Re: Java Script Value to CF Value You'll need two pages or steps to get this value - one for the form itself, then when you submit that form you can have the value. form action=mypage.cfm input type=hidden name=wide /form script language=JavaScript document.forms[0].wide.value = document.images[0].height; document.forms[0].submit(); /script Robert Harrison wrote: I have a value I'm retrieving from Java Script. I need to set it to a CF value. What is the correct syntax. Below does not work, but it makes the point on what I'm trying to do. How do I do this correctly? cfset wide=script language='javascript'document.write(document.images[0].height)/scrip t Thanks, Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287693 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Java Script Value to CF Value
Yep, that's possible - if you're using CF8 there are tags/functions to do this, if not you could use Rick Root's excellent ImageCFC or Alagad Image Component. For info, Railo has a very handy attribute which lets you get image dimensions directly from a cffile action=info file=... tag. Robert Harrison wrote: ALTERNATE METHOD: I can read the file using CFFILE. If it is an image file is there some way I can get the width and height? Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287694 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Java Script Value to CF Value
I'm trying to control image sizes on a image file upload. Image CFC seems to be usable. I'm wishing I could just use CFIMAGE in CF8, but my host is not there yet. Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . -Original Message- From: David Low [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 04, 2007 9:55 AM To: CF-Talk Subject: Re: Java Script Value to CF Value But that is for passing CF values into Javascript, isn't it? Robert is trying to get a client-side JS value (which is defined once an image has loaded) into the server-side CF code. Can't be done in that way. Robert, what is it you're trying to do in general, aside from the snippet of code you gave? Dan Vega wrote: Robert, Look at the docs for toScript(), this function will help you out. Dan On 9/4/07, Robert Harrison [EMAIL PROTECTED] wrote: I have a value I'm retrieving from Java Script. I need to set it to a CF value. What is the correct syntax. Below does not work, but it makes the point on what I'm trying to do. How do I do this correctly? cfset wide=script language='javascript'document.write(document.images[0].height)/script Thanks, Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287698 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Java Script Value to CF Value
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:267372 ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Robert Harrison [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 04, 2007 10:00 AM To: CF-Talk Subject: RE: Java Script Value to CF Value ALTERNATE METHOD: I can read the file using CFFILE. If it is an image file is there some way I can get the width and height? Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287701 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4