Groups | Blog | Home
all groups > macromedia flash flash remoting > june 2004 >

macromedia flash flash remoting : Posting to CF template


Mark Forsberg
6/24/2004 6:08:28 PM
I'm using a flash interface for a login page. When I use the getURL() the
cf template is spawned and things work. Of course, I don't want to pass the
variables in the URL. I've tried to post the variables to the cf template, but
whenever I click the button nothing happens. I've got both lines of code in
here.

function logbtn_clicked()
{
if (user_txt.text == "" or pw_txt.Text == ""){
error_mb._visible = true;
}else{
//Send the variables to the CFML page

//getURL("start1.cfm?user=" + escape(user_txt.text) + "&pw="+
escape(pw_txt.text));

loadVariables("start1.cfm", "_root", "POST");

}
}

Could anyone point me in the right direction on Posting variables to a cf
template? I guess that I should also ask if posting will allow the spawning of
the new template. I'm new to this, but it's pretty cool so far. Thanks.

Mark F.

Hi_C
6/24/2004 7:07:16 PM
Mark,

i remember my first days with flash remoting and cf and yes it is pretty cool.

from the looks of your post you don't seem to be using remoting. am i correct
on that? if not, you should be. you want to create a remoting application (from
your new ->file templates) and have the flash page send the username and
password to cf for authentication. in a nutshell, your flash page will execute
a connection to a cf component (a cfc that you create) when the user clicks
your login button. you simply send the username and password text from flash as
an object to the function in you cfc. have cf validate and send back whether
the user is authenticated or not. see an earlier post in this forum titled
something like "can pass variables to cf but not cf to flash" that i answered.
it has a simple code axample.

HI_C
AddThis Social Bookmark Button