[thelist] Javascript Variables to Cold Fusion Variables

Hinojosa, Robert A Robert.Hinojosa at Relizon.com
Tue Jul 17 14:27:26 CDT 2001


impossible... hardly....

the answer lies in images, iframes, etc.

check 'dis out!

[a.cfm] contains this code.
<html>
<head>
	<title>Untitled</title>
</head>
<body>
<script language="javascript">
	a = "i am a js var";
	work = new Image();
	work.src = "b.cfm?letter=" + a;
</script>
</body>
</html>

[b.cfm] contains this code.
<cfquery datasource="#localDSN#" name="a">
	insert into test (letter) values ('#url.letter#')
</cfquery>

so, you can in fact have processing going on the same page without reloading
because images are downloaded seperately from the content.  every time you
give a src to the image object you are calling the server.  This is exactly
the way old school cgi chat programs were written.  so you can do whatever
you want in javascript and pass that var as an url var through an image.

HTH,

Robert Hinojosa
Robert.Hinojosa at relizon.com
972.243.4343 x7446


-----Original Message-----
From: Sarah Heffron [mailto:disaster7 at yahoo.com]
Sent: Tuesday, July 17, 2001 1:36 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] Javascript Variables to Cold Fusion Variables


Yes this is impossible, I spent way too much time last year trying to figure
this out, but unless
you reload the page or call a new one, you can't do it.

I have found a few little "tricks" to do get around the issues I had, so I
could take a look at
what you're doing to see if it's possible.


Sarah


--- Josh Spiegel <joshsquared at yahoo.com> wrote:
> 
> Is there a nice way to transfer javascript variables to coldfusion
variables
> on the same page.
> 
> I have thought it over and it seems like it might be imposible since the
> cold fusion is executed on the server before the javascript is executed by
> the browser.  Is this correct?
> 
> Thanks,
> Josh
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt ! 


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt ! 




More information about the thelist mailing list