Welcome, Guest. Please login or register.
Did you miss your activation email?
05/23/12, 12:30
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  PHP, Perl, ASP, JSP, CFM (Moderators: Flash-db, Musicman, vesa kortelainen, Ronald Wernecke, Jorge Solis, nothingGrinder)
| | |-+  trouble with dynamic variable
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: trouble with dynamic variable  (Read 1978 times)
lisa1958
Server what's that
*
Posts: 1



View Profile Email
« on: 01/31/02, 15:07 »

I am trying to get data from a database using Cold Fusion and FLash.

I have a page "data.cfm" It works great.

<cfsetting ENABLECFOUTPUTONLY=yes>
<cfset myVar=122>
<CFQUERY NAME="getNames" DATASOURCE="ows" DBTYPE="ODBC">
select *
from user_name
where id =  #myVar#
</CFQUERY>
<CFOUTPUT QUERY="getNames">
&first_name=#urlEncodedformat(first_name)#&last_name=#urlEncodedformat(last_name)#&
</CFOUTPUT>

When I load this in a brwoser and then load the html page with my flash movie in it
it shows the data from the hard coded variable myVar=122 in the slash
but when I replace 122 with #form.pick_one# and load data.cfm  from a previous page pick_name.cfm
with a drop down that sends the form info, the query displays great on the cfm page but not in Flash.
The only thing I change is

<cfset myVar=#form.pick_one#>

I get no errors just no data in Flash.

Thanks,
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #1 on: 01/31/02, 20:20 »

Ok,

I assume your using somethink like:

loadVariablesNum ("data.cfm", 0, "POST");

to call the data.cfm file and return the query results to your flash movie.  

Then you have a dynamic text field named first_name and last_name in your Flash movie.  

1) If you are using this within a Movie Clip their could be an incorrect path somewhere - be sure to give all your movie clips an instance name.  If you are using this within a movie clip - post the relevenat information and we'll work out a correct path.

2) I have no idea what the rest of your script looks like.  It's important to remember that the string -

first_name=TheFirstName&last_name=TheLastName

Is the only thing printed out when the script is run.  Their can be no other html tags such as <html> on the page - and they must be in that format.  You can test this by typing in the URL to Data.cfm - and looking at the source code for the Page.  
Logged

-Jeff.
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!