<html>
<font size=3>1) I can't put variables in the URL and use FORM variables
at the same time?<br>
2) Why do I need to put it on the body's onload attribute? It seems to
work fine just putting it inline in the <head> of the
document.<br>
<br>
At 01:34 PM 8/15/00 -0400, Pete Freitag wrote:<br>
<blockquote type=cite cite>ColdFusion is run on the server side, and
JavaScript is run on the client<br>
side. The serverside gets run first, so you can use ColdFusion to
set<br>
JavaScript variables, but you can't use JavaScript to access
coldfusion<br>
variables. But I do see a way around your particular problem, the
code<br>
follows:<br>
<br>
<br>
<cfif NOT IsDefined("url.navLanguage")><br>
<x-tab> </x-tab><SCRIPT
LANGUAGE="JavaScript1.2"><br>
<x-tab> </x-tab><x-tab> </x-tab>if
(navigator.appName == 'Netscape')<br>
<x-tab> </x-tab><x-tab> </x-tab><x-tab> </x-tab>var
language = navigator.language;<br>
<x-tab> </x-tab><x-tab> </x-tab>else<br>
<x-tab> </x-tab><x-tab> </x-tab><x-tab> </x-tab>var
language = navigator.browserLanguage;<br>
<cfoutput><br>
<x-tab> </x-tab><x-tab> </x-tab>document.location
= "#cgi.script_name#?#cgi.query_string#&navLanguage="
+<br>
language;<br>
</cfoutput><br>
<x-tab> </x-tab></SCRIPT><br>
</cfif><br>
<br>
That should work as long as your not passing form variables into the
page.<br>
You need to throw that function into the body's onload attribute.<br>
<br>
_________________________________________<br>
Pete Freitag ([EMAIL PROTECTED])<br>
CFDEV.COM / NETDesign Inc.<br>
<a href="http://www.cfdev.com/" eudora="autourl">http://www.cfdev.com/</a><br>
<br>
-----Original Message-----<br>
From: Peter Theobald
[<a href="mailto:[EMAIL PROTECTED]"
eudora="autourl">mailto:[EMAIL PROTECTED]</a>]<br>
Sent: Tuesday, August 15, 2000 1:07 PM<br>
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]<br>
Subject: Javascript variables and Cold Fusion<br>
<br>
<br>
Sorry for being redundant... I know there has been plenty of discussion
on<br>
this topic lately and I didn't read any of them :-(<br>
<br>
How do I read a Javascript variable from Cold Fusion?<br>
Specifically, I need to know the browser's language setting.<br>
Here is what I would like to do:<br>
<br>
<SCRIPT LANGUAGE="JavaScript1.2"><br>
if (navigator.appName == 'Netscape')<br>
var language = navigator.language;<br>
else<br>
var language = navigator.browserLanguage;<br>
<br>
<CFSET Session.language = (javascript) language><br>
<br>
Obviously I can't do that because CF is executed on the server before
the<br>
page is ever sent, and Javascript is run by the browser on the client
side.<br>
<br>
<br>
---------------------------------------------------------------------------<br>
Peter Theobald, Chief Technology Officer<br>
LiquidStreaming
<a href="http://www.liquidstreaming.com/"
eudora="autourl">http://www.liquidstreaming.com</a><br>
[EMAIL PROTECTED]<br>
Phone 1.212.545.1232 Fax 1.212.679.8032<br>
<br>
----------------------------------------------------------------------------<br>
--<br>
Archives:
<a href="http://www.mail-archive.com/[email protected]/"
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
To Unsubscribe visit<br>
<a href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk"
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk</a>
or<br>
send a message to [EMAIL PROTECTED] with 'unsubscribe' in<br>
the body.<br>
<br>
------------------------------------------------------------------------------<br>
Archives: <a href="http://www.mail-archive.com/[email protected]/"
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
To Unsubscribe visit <a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk"
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk</a>
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body. </font></blockquote><br>
<br>
-<font
size=3>--------------------------------------------------------------------------<br>
Peter Theobald, Chief Technology Officer<br>
LiquidStreaming <a href="http://www.liquidstreaming.com/"
eudora="autourl">http://www.liquidstreaming.com</a><br>
[EMAIL PROTECTED]<br>
Phone 1.212.545.1232 Fax 1.212.679.8032<br>
</font></html>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.