GetURL in Flash Form
I'm trying to use getURL to pass a value to another template.
I'm having no luck. the URL variable cfgridkey is "undefined".
<cfsavecontent variable="getRecord">
getURL('comment.cfm?cfgridkey=' +
searchResults.dataProvider[searchResults.selectedIndex]['COMMENT_KEY'],'_self');
</cfsavecontent>
<cfgrid format="flash" name="searchResults"
colheaderfontsize="10" colheaderalign="center" colheaderbold="yes"
height="210" onchange="#getRecord#">
<cfgridcolumn name="comment_key" header="Comment ID"
dataalign="center"/ >
<cfgridcolumn name="lastname" header="Last Name"/>
<cfgridcolumn name="firstname" header="First Name"/>
<cfgridcolumn name="comment_date" header="Comment Date"
dataalign="center"/>
<cfgridcolumn name="comment" header="Comment Preview"
width="400"/>
</cfgrid>
The grid is being populated with remoting. Would that make
any difference as to whether the dataProvider can be viewed by the
application?
Thanks.
I would say the problem has to be that the value is not being
added to the url.
Is there a reason your still using cfsavecontent ?
To debug, I would do the following:
1. Put in an
Alert(searchResults.dataProvider[searchResults.selectedIndex]['COMMENT_KEY'])
To see if the value is being returned
2. Put in a hard coded value and see if this works
Let's assume a valid comment_key is "search", then
getURL('comment.cfm?cfgridkey=' + 'search';
How are you trying to access the value in the comment.cfm
page ?
I think by default it is URL.cfgridkey
You can also include the attribute of "post" or "url" in the
geturl function call.
On reading the doc's about geturl, I can't see anything about
a default value. So I would suggest putting it in
getURL('comment.cfm?cfgridkey=' +
searchResults.dataProvider[searchResults.selectedIndex]['COMMENT_KEY'],'_self',
'GET');
Ken
Similar Messages
-
Can you pass more than on variable with getURL in flash form
I needed to call another page from inside a form not with the submit button and fournd this piece of code
<cfinput type="button" id="btEdit" name="btEdit" value="View" onClick="getURL('../../forms/Program_populate.cfm?<cfoutput>#SESSION.URLToken#</cfoutput> &Reference='+data.dataProvider[data.selectedIndex]['ID'],'_blank')" >
"Reference" is passed in the URL, I have tried to tweek this to pass an additional field "ID" , Vendor_Number" , but have been unable to find the correct syntax. If anyone can help that would be great.
Thanks,
Mikeurl variables are passed as follows
after the file name a question mark (?) then,
name=value with an ampersand (&) between name value pair
You may be having problems with escaping the action script code.
If the value is a coldfusion value just cfoutput the value as in your example.
If the value is from a form element then you need to escape it as in the example
remove the comments from below
getURL('../../forms/Program_populate.cfm?
<cfoutput>#SESSION.URLToken#< /cfoutput>
&Reference='+data.dataProvider[data.selectedIndex]['ID']
// need to add more info so put in the plus and add the text of the url variable name (let's assume the id is from CF)
+ '&ID=<cfoutput>#queryName.ID#</cfoutput>&Vendor_Number='
//we have add the url variable name above, but let's assume it is coming from a form field
// then we need to close the string, done above and add the value
+ data.dataProvider[data.selectedIndex]['Vendor_Number']
,'_blank')
Hope this helps.
If you still have problems, assing all this to a cf variable and output it so you can read what it is to debug it.
Ken -
Using cfselect onBlur to reload page using a Flash form
I am having trouble trying to get <cfselect onBlur=""> to work inside of a <cfform format="flash"> using Flash. As soon as I put any value into the quotation marks, the Flash form no longer displays.
The current code I have using your syntax is the following:
<cfset thisPage = "http://#cgi.server_name#">
<cfif len(trim(cgi.server_port))>
<cfset thisPage ="#thisPage#:#cgi.server_port##cgi.script_name#?#cgi.query_string#">
<cfelse>
<cfset thispage ="#thisPage##cgi.script_name#?#cgi.query_string#">
</cfif>
<cfform name="fQuiz" preloader="false" format="flash" height="750" preservedata="yes">
<cfselect query="qDescriptionsByInteraction" name="description" id="s3" display="MEDIABITNAME" value="MEDIABITID" width="200" label="Description (video):" onChange="getURL('#thispage#')"></cfselect>
</cfform> -
Passing value from child to parent (flash form)
Dear all,
I have 2 pages (both flash form): First.cfm (parent) and
Second.cfm (child).
In First.cfm, I have a textbox and a button. Once I click the
button it will load the Second page.
In Second.cfm, I have a button. Both pages are still active.
Now the question is .. when I click the button on the Second
page, how to pass the value back to the First page and assign it to
my textbox in my First page? I want the value to be displayed in my
textbox without reloading the First page.
Any suggestions and examples?
This codes do not work in Flash Form. But if I use HTML with
a bit of modification then it works. How to make it work in Flash?
++++++++++++++++
this is first.cfm
++++++++++++++++
<cfoutput>
<cfform format="flash" name="myform">
<cfinput type="text" name="txtCustomerID" width="100"
label="Customer ID">
<cfinput type="button" name="btnGetCustomer" value="Get
Customer" onclick="getURL('second.cfm','_blank')">
</cfform>
</cfoutput>
++++++++++++++++
this is second.cfm
++++++++++++++++
<cfform format="flash">
<cfformitem type="script">
function buttonclick():Void {
getURL('javascript:window.opener.document.forms["myform"].elements["txtCustomerID"].value
= "XXX";');
</cfformitem>
<cfinput name="btnClick" type="button" value="xx"
onclick="buttonclick()">
</cfform>
Thanks in advance
KeikoYou address the parent from the child using:
this._parent.sMyVariableName = "whatever";
Remove '_spamkiller_' to mail -
Hi all,
My name is Unyime Edet, male, from Nigeria.
I am currently creating a website with Dreamweaver and i
really want to know how i can create a Flash Form for my
Registration/application form page, starting from the scratch. I
really need some help and i want to know how to start. I am using
Dreamweaver, Fireworks, Flash and ColdFusion MX. Please kindly let
me know how to validate flash forms, and also how to send the data
gotten from the forms to a customized email address, then after the
user click the SUBMIT button, it redirects the user to a Thank you
page, OR when the user fills an incorrect data, how a mesage can
popup in flash, telling the user that the field that is required is
empty, or has not been completed.
I will be very glad if my post is reviewed and solved. Thank
you all. My email address is: [email protected] My website is:
www.izi2brauz.t83.net.
Sincerely,
Unyime EdetYour replacement form.swf could be as simple as an empty
movie with just
getURL("form.html","_blank");
in a frame script space.
However, while this will get the new html doc on the user's
screen, there may be more code in the opener swf that needs to be
managed. There may be some code in there that is waiting for the
form to be sent, or dismissed, or there may be some code that is
waiting for that form.swf to be closed. You'll have to try it and
see what happens.
There are many Flash decompilers available for Flash as2
files. If these movies are your intellectual property then you
could use one of these tools to decompile the movie and fix the
problem at the source. -
I have a site that is put together with cfmodule templates
for the header and footer, with integration with a content
management system that I built myself. I am trying to embed a
ColdFusion form with type="Flash" on the body of the page but it is
not compiling to Flash. If I remove it and go with a standard
cfform it works fine - but then I had to redo my cfformgroup tags
etc. I designed the form outside of the page -- and it generates
just fine.
Obviously there is some limitation to how and when a cfform
with type="Flash" will generate, when the page has cfmodules or
cfincludes. Is there any guideline I can use to determine when not
to try Flash Forms ? I do not want to spend the time on complex
form, only to discover I have to change it back to a standard
cfform. Any information on when a page can and cannot generate a
flash form would be appreciated - as many sites these days are
getting pretty complex with included content etc. Thank you.Hi Mow,
Yes, you cannot call javascript directly when you use
<cfform format="flash">. All methods (onClick, onBlur etc)
will call ActionScript, not JavaScript anymore.
This is not a perfect example, but you can get the picture.
You can copy and paste the code below into one cfm file.
<cfform>
<script language="javascript1.2">
function popup1() {
window.open ('
http://www.google.com');
</script>
<cfinput type="button" name="btnClick" value="Click"
onclick="popup1()">
</cfform>
<cfform format="flash">
<cfformitem type="script">
function popup2() {
getURL("javascript:window.open ('
http://www.google.com')");
</cfformitem>
<cfinput type="button" name="btnClick" value="Click"
onclick="popup2()">
</cfform>
Hope it helps
Keiko -
I Need Dire Help Making a Flash Form
Hello, I need some serious help creating a Flash Form.
I Have used a template from another site with the following
input boxes:
Name: __________
Email: __________
Comments: ____________
However, i had the script working fine, along with its php
script,
when i was trying to add more "text" boxes, i must have
messed the script up somhow.
When I submit that form, the name is send and email, but the
email is blank.. ie, there is no "comments"
here is the code:
on submit button:
on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("email.php", "POST");
sent email messege
onClipEvent(data){
// show welcome screen
_root.nextFrame();
and the php script (mailer.php)
php form email.pho
<?php
* PHP 4.1.0+ version of email script. For more
* information on the mail() function for PHP, see
http://www.php.net/manual/en/function.mail.php
// First, set up some variables to serve you in
// getting an email. This includes the email this is
// sent to (yours) and what the subject of this email
// should be. It's a good idea to choose your own
// subject instead of allowing the user to. This will
// help prevent spam filters from snatching this email
// out from under your nose when something unusual is put.
$sendTo = "[email protected]";
$subject = "My Flash site reply";
// variables are sent to this PHP page through
// the POST method. $_POST is a global associative array
// of variables passed through this method. From that, we
// can get the values sent to this page from Flash and
// assign them to appropriate variables which can be used
// in the PHP mail() function.
// header information not including sendTo and Subject
// these all go in one variable. First, include From:
$headers = "From: " . $_POST["firstName"] ." ".
$_POST["lastname"] . "<" . $_POST["email"] .">\r\n";
// next include a replyto
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
// often email servers won't allow emails to be sent to
// domains other than their own. The return path here will
// often lift that restriction so, for instance, you could
send
// email to a hotmail account. (hosting provider settings may
vary)
// technically bounced email is supposed to go to the
return-path email
$headers .= "Return-path: " . $_POST["email"];
// now we can add the content of the message to a body
variable
$message = $_POST["message"];
// once the variables have been defined, they can be included
// in the mail function call which will send you an email
mail($sendTo, $subject, $message, $headers);
?>
If anyone can see why the "comments" section is not being
sent?
Also: My original problem was how do you add more text boxes.
I want something like this:
Name:
Address:
Phone:
Mobile:
Email:
Website:
Comments:
Ive spent days and days trying to work out how to first make
a form that actually works, then add more text fields
Ive looked at many basic form tutorials, but they all seem to
only have 3 or 4 text fields.. Name, Email, Comments... etc
I haven't a clue how to edit the script both in action script
and php to add more fields easy.
I really need some help with this, its turning into a
nightmare for me.
I can provide someone with my .fla project file if they care
to take a look at what im doing wrong.
Thanks
Pan
ps. Please note: "$sendTo = "[email protected]";" =
this line i know i must put in my own email.This is all about timelines. It seems there is a movieclip
named 'form' (or possibly an actionscript object, can't tell). Any
variables created on that timeline are sent.
So you could have your new textfields on another timeline.
Or you could have textfields with no instance name in the
form timeline.
Those are the first two things to look at. Post the FLA and
we can tell you more specifically. -
Flash form error, can't use the same name more than once? need workaround
I've always written my forms to have multiple buttons, one
for updating and one for deleting. so in html I would do this:
<input type=submit name=action value=Update>
<input type=submit name=action value=Delete>
so I'm trying the same thing with flash forms in cold fusion:
<cfinput label="Update" name="action" type="submit"
value="Update">
<cfinput label="Delete" name="action" type="submit"
value="Delete">
but now I get this message:
2 Errors found.
Error /index.cfm:334
id 'action' was already defined on line 333
Error /index.cfm:335
id 'action' was already defined on line 333
Is there a way to make this work or do I have to either
create a special action_delete or a new form? I'd like to keep the
logic the way I like.
Any suggestions?
Thanks,
JohnI was hoping to do logic like this
<cfparam name="action" default="list">
<cfif action equal "list">
<cfelseif action equal "update">
<cfelseif action equal "detail">
<cfelseif action equal "delete">
</cfif>
So I just converted everything to html and things work the
way I like. thanks anyway. The forms don't really buy me anything. -
Flash forms -- Not displaying in IE
This is my first foray into flash forms, and I discovered
yesterday that while they look/work beautifully in Firefox
(2.0.0.4), they're not displaying at all in IE (6 or 7).
I'm using it to force the user to input their date in a
uniform format, so I'm sure there's a non-flash workaround. I'd
like to get this sorted out though, so my future work with flash
can be more involved.
Code is attached. Please let me know if I can provide further
clarification.Michael --
Thanks for your help.
I think I've narrowed the problem down -- it's not that it
won't display my flash form in IE, it's that it won't display it in
a Fusebox environment. I'm going to poke over at their site to see
what they have to say -- I suspect I'll need to upgrade the version
of Fusebox that I'm using. :) -
How to validate date fields in the flash form
i want to validate the date fields to make sure the values
are not greater than today's date and from-date is less than or
equal to to-date in the flash form. Does the actionscript have a CF
DateDiff function for the validatation?
ThanksI finally (after much reading up on actionscript) figured out
my problem with date validation...which was similar to yours...
I posted the solution I found for my AS date validation issue
here:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=22&threadid=1232361
I hope it helps!!! -
Flash forms in Safari 3.0
I just installed the new Apple Safari 3.0 for Windows. I
wanted to see how our web site would work with the new browser. I
found that flash forms do not load. All I get is a blue lego block
with question marks. I checked the plugins and there is a listing
for "Shockwave Flash" version 9.0 r45. Is there something else that
needs to be installed to make this work?
Thanks,
DonCount me on with the problem. We are running CF 7. I have
also not found anything. I did report it using the little bug in
Safari 3 and have been looking for the latest releases of the
browser. I love the browser overall (I am an apple fan) but we need
this to work. I am wondering if the problem is in how CF renders
and puts out the flash content. Some kind of meta data that is not
up to date? Have no clue however.
Marius Morosanu
[email protected]
www.goreve.com -
How to get "Subject" & "Message" text from Flash form to default e-mail MS Outlook?
Hi,
I have the following code which is working fine except I can't get the user typed data from flash form to my default e-mail (MS Outlook) application. How to edit the following code?
In the code:
1) To ----> this field is okay since this email ID doesn't change
2) Cc ----> this filed is also okay since no changes will be in email ID
3) Subject ----> this may not be always as "Feedback", user may like to change the subject
Whant I would like to add more here is:
1) From ----> this text to be retrieved from "fromText.txt" input text box
2) Message ----> this text to be retrieved from "MessageText.txt" input text box
//1.Button event listener
SendMail.addEventListener(MouseEvent.CLICK, SendEMail);
//2.The SendMail function open up email application to send email.
function SendEMail(event:MouseEvent):void {
var email:URLRequest = new URLRequest("mailto:[email protected]?CC=[email protected]&Subject=Feedback");
navigateToURL(email, "_blank");
Thanks in advance for any support.
Regards.Thanks for the reply. I tried the code and result is like the following:
To: [email protected]
Cc: [email protected]
Subject: [object TextField]?body=From: [object TextField]
Body: Blank
The problem exist in SUBJECT & BODY.
Further help, please.
Thanks.
PS: I removed the ? before body and put & ------> the result is as follows:
To: [email protected]
Cc: [email protected]
Subject: [object TextField]
Body: From: [object TextField]
[object TextField]
One more thing that it opens an empty web page with the following text in adress bar:
mailto:[email protected]?CC=poweruser@helpdesk&Subject=Feedback -
Flash Forms do not work in Production
My question is simple. I am unable to find server
requirements for Flash forms anywhere on Adobe's website. It claims
you can find more in the other technical documentation but I
couldn't. What technologies need to be installed in order to
utilize flash forms SERVER-WISE?
I have a production server, a pre-production server (running
full cfmx7), and a development server. The application works on the
test machine, and on pre-production. The flash form simply does not
render and no errors are displayed.
If I convert it to a normal cfform it displays fine on the
troubled machine. It will not display even the most simple of flash
forms.
Thanks for any help!Did you make sure that you have a virtual directory mapped to
the CFIDE directory in IIS on your production server?
Ron -
International characters in flash forms
Hello. Is there any way to put international (here: polish)
characters into flash forms (like text input)? Thanks in
advance.PIT_PIT wrote:
> Hello. Is there any way to put international (here:
polish) characters into
> flash forms (like text input)? Thanks in advance.
yes:
http://www.sustainablegis.com/projects/flashforms/unicode.cfm
<cfprocessingdirective pageencoding="utf-8">
<cfquery name="getU" datasource="unicodeLab">
SELECT uniText, uniLanguage
FROM unicodeTest
WHERE uniLanguage='russian'
</cfquery>
<cfsavecontent variable="inputStyle">
borderStyle:none;
disabledColor:#2e8b57;
fontSize:11;
backgroundColor:#EFF7DF;
fontFamily:'Arial Unicode MS',Arial,Helvetica,sans-serif;
</cfsavecontent>
<cfparam name="form.unicodeTxt"
default="#getU.uniText#">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<title>flash and unicode</title>
</head>
<body>
<cfform action="unicode.cfm" method="POST"
format="Flash">
<cfformgroup type="HORIZONTAL">
<cfinput type="Text" name="unicodeTxt" width="120"
required="No" visible="Yes"
enabled="Yes" size="20" maxlength="20" style="#inputStyle#"
value="#form.unicodeTxt#" label="unicode text:">
<cfinput type="Submit" name="go" value="submit"
visible="Yes" enabled="Yes">
</cfformgroup>
</cfform>
</body>
</html> -
How to Use Captcha in Flash Forms
Hi, does anyone knows how to use a captcha in flash forms
I am using Coldfusion 7 not version 8.
Please Guide Me
Cheers> CF response
You said you needed help with ActionScript. What I gave you
is ActionScript.
Coldfusion has no built-in method called
match. You should use REMatch(reg_expression, string) or
REMatchNoCase(reg_expression, string), assuming you're on CF 8, of
course.
Maybe you are looking for
-
Quicktime takes a LONG time to load Videos (all of a sudden)
Since a few weeks it takes Quicktime FOREVER to open a Video file. Depending on its size, it takes longer. It takes almost 1:30 for a 700MB Video file, for instance. I dont know why this is, and I havnt really changed anything, besides the Apple Upda
-
Problem Replacing pages in Adobe Acrobat 8 Pro
I have a 130 page PDF document with hundreds of links, all of which work and display in their proper position on all pages in original document. I have generated new pages to replace most existing pages & I'm having a problem with the links. Both the
-
Sending smartform as PDF attachment through email
Hi, I have used the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send the smartform as PDF attachment through email.In SOST transaction I can see that the mail has been sent to the reciepient,but the mail is not going to the mail box.What would be the reason
-
TS3212 difficulties downloading itunes 10.7
I have been trying to update my itunes to itunes 10.7 for my laptop, but everytime i try doing that, an error message keeps coming up and keeps terminating the download, what do i do?
-
Problem with GX630 optical drive
Note: I have owned the GX630 for about 4-5 weeks give or take Overall I really like the GX630 I purchased. It has ran and performed exceptionally well. With that said, I have a slight problem with the optical drive of my 630. I have noticed this prob