In addition to Christian's links I've an article about using JavaScript and
an image to send data back and forth here:

http://www.depressedpress.com/DepressedPress/Content/ColdFusion/Essays/GIFAs
Pipe/Index.cfm

Data goes to the server as URL variables and comes back from the server as
cookies.  If you're working with a version of CF higher than 4.5 you can
replace the CFCONTENT I describe with Christian's version for better
performance.

The bottom of the article also links to several other potential solutions to
this problem.

Jim Davis

> -----Original Message-----
> From: Christian Cantrell [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 23, 2003 11:12 AM
> To: CF-Talk
> Subject: Re: Javascript error catching
> 
> One technique I have occasionally used which is far simpler than a
> hidden frame is to use an Image object to send data back to the server.
>   The following code (untested) sends a name/value pair from JavaScript
> to the server:
> 
> var tmp = new Image();
> tmp.src = "captureVars.cfm?foo=bar";
> 
> You can imagine how wrapping this up in a function that takes all kinds
> of arguments would work out very nicely for quickly and easily sending
> JavaScript variables to the server.  You can even go so far as to
> return an image from your CFM page so that the image object is valid.
> For information on sending binary data from CF to the browser (in this
> case, to JS), see these blog entries:
> 
> http://www.markme.com/cantrell/archives/002658.cfm
> http://www.markme.com/cantrell/archives/002736.cfm
> 
> Christian
> 
> On Monday, June 23, 2003, at 10:06 AM, Hugo Ahlenius wrote:
> 
> > I have this idea to improve the quality of a heavy DHTML/Javascript
> > application -- Storing some important variables (browser, OS, screen
> > size)
> > from javascript when window.onerror function is triggered. This could
> > be
> > stored in a db, or just in a log-file. (One could, onerror, trigger a
> > function in a hidden frame that passes these, in a request, to the
> > server).
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=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
                                

Reply via email to