I would revisit my plan of attack if I were to find myself in that situation. Either convert the form into a multi-step form, or create a Flash Remoting interface for this kind of case. Javascript is entirely too unreliable to trust -- especially with business logic like this.
-- Eric C. Davis Programmer/Analyst I Georgia Department of Transportation Office of I.T. Applications Web Applications Group 404.463.2860.199 [EMAIL PROTECTED] -----Original Message----- From: James K Tieman [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2003 11:56 AM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] onBlur - CFC Method I just trying to keep my form data in sync with my CFC instance data. If an form inputbox has this for a value #session.car.motor.getNumberOfCylinders()# and I change it from say 4 to 6, how do I call session.car.motor.setNumberOfCylinders(?inputbox value/6?)to update the CFC instance? The problem is there are other fields on the form that depend on the numberofcylinders for other calculations. So, is Javascript my only answer to form calculation and I have to update the CFC data on submission of the form? Jamie -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Davis, Eric Sent: Monday, October 20, 2003 10:12 AM To: '[EMAIL PROTECTED]' Subject: RE: [CFCDev] onBlur - CFC Method Well, there is, but it's some rather finagley javascript that wouldn't necessarily give you what you're looking for. You'd need at least the following: 1) A component cached in the session scope 2) A page in an application which invokes the component 3) Javascript enabled in the client machine. Now: <html><head><script type="text/javascript"><!-- [[CDATA[ function callSessionCFC () { var i = document.createElement('iframe'); i.location.href = "path/to/page.cfm?" + anyDynamicVariables + fromScript; return; } window.onload = function () { fld = document.getElementById('invokeFromMe'); fld.onblur = callSessionCFC; } // ] ]] --></script></head><body><form ...> <input id="invokeFromMe" ... /></form></body></html> This is provided merely as a proof of concept: untested and not endorsed as a technique. -- Eric C. Davis Programmer/Analyst I Georgia Department of Transportation Office of I.T. Applications Web Applications Group 404.463.2860.199 [EMAIL PROTECTED] -----Original Message----- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2003 10:56 AM To: '[EMAIL PROTECTED]' Subject: RE: [CFCDev] onBlur - CFC Method Erm, I would say only if the onBlur submits the page as a form to a page which can call the CFC. There is no way that you can call a CFC directly from a JS event (not without a page refresh) -----Original Message----- From: James K Tieman [mailto:[EMAIL PROTECTED] Sent: 20 October 2003 15:52 To: Cfcdev Subject: [CFCDev] onBlur - CFC Method Can I call a Session scoped CFC method from the onBlur event of an input box? ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
