You would want to do this:

var data1 = "Friday";
document.getElementById("ChartImage1").src =
realtimechart.cfm?variable_name=' + escape(data1);

realtimechart.cfm would then acces url.variable_name which would contain
"Friday".

Only simple data types can be passed via the url without some sort of
serializing.   Also make sure you url encode anything passed via the
url.

~Brad

-----Original Message-----
From: Richard White [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 17, 2006 3:44 PM
To: CF-Talk
Subject: passing data in url

hi, i am wondering how to pass data in the url and then to use it in the
page i am calling. 

I have seen this in the documentation somewhere but cant find it
anywhere now :(

i think i pass data as follows in javascript:

var data1 = "Friday";
document.getElementById("ChartImage1").src = "realtimechart.cfm?data1";

the realtimechart page i am calling uses cfscript but i dont know how to
use the data1 variable that i have just sent in the url.

also does it work the same for all datatypes, i.e. whether i pass a
string, array, structure etc...

thanks for any help



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257103
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to