Need to use variable inside a text field.
I have a field in my database called "introduction" that contains the following:
"My name is #myname#"
When I output #introduction# to the webpage, I would like #myname# to show the field value - i.e. "My name is Brett". How do I let CF know to display the variable? Right now, I'm gettting "My name is #myname#"
thanks!
B.
This is a troublesom construct that will often devole into more trouble then it is worth, but almost everybody tries it at least once.
Anyway you can use the evaluate() function to do what you wish.
I.E.
<cfoutput>#evaluate(introduction)#</cfoutput>
Similar Messages
-
Using variables in input text fields nested in a movieclip
Hi all,
I am designing a roulette wheel type game. I am using a variable, "_global.myMoney = 0; " to keep track of the total money the player has. When I built the prototype, I used a dynamic text field on the stage with an instance name of "myMoney_text" and a variable of "_root.myMoney"
Now, I need to move this text box into a movie clip with an instance name of "winnings_mc"
When I test the movie, it looks like it showing the style sheet (font size, font, etc...) inside the dynamic text box. If I change the variable of the box to "_root.winnings_mc.myMoney" it seems to track initially, but now my updateMoney function in my main script does not work.
The function is called like this:
trace("updated money equals " + updateMoney(myMoney));
This always traces zero now, the initial value.
Any ideas?
Thanks!if you want to use a global variable, when initializing and everytime you assign a new value, prefix the variable with _global:
_global.myMoney.
whenever you want to retrieve its value, use myMoney.
you should not be using _root.myMoney.
and as ned mentioned, you should stop using the variable associated with textfields and use the text property of your textfield to assign its text. -
Using variables in a text field
I am very rusty using lingo, and I cannot find how to do this
in any of my old projects (using director 7 if that helps you date
this)
I am trying to generate a random number, which becomes
visible in a text field on the stage after the user presses a
button.
The text field is called "hotseat"
on the button, I have a script which so far reads
on mouseUp
set grandom = random (50)
end
As you can see, I did not make it far. 8-)
In an earlier part of the project, I got around this issue by
evaluating the variable in an enormous if..then...else if
statement. I am trying to find a less tedious way to do it
Any help would be appreciated.
BobR
ps I am still using Director 7on mouseUp me
set gRandom = random 50
member("fieldMemberName").text=string(gRandom)
end -
Inserting in-line variable into a text field
Hello,
I want to add a variable within a text field (dymanic value within a sentence). Basically, I want the form to display something like the following:
"The person named <person name> is an employee of the company"
The only way I could do this so far is by creating three elements on the form: the first is a text element that contains "The person named", the seond is a text field element with no label that contains the "<person name>" variable, and the third is another text element that contains "is an employee of the company."
I don't really like this approach as if the name of the employee is too long, it might get cut off. If it was too short, there will be a lot of extra space between the name and the rest of the sentence.
Another solution is to pass a string variable with the complete text (I'll have to build the string before calling the form). Similarly, I can pass an internal table with the text. I don't think either of these two solutions is ideal as LifeCycle designer should provide an easier way to do so (just like in SmartForms).Hi Abdullah Azzouni ,
This is possible to add a dynamic text between the static text in Adobe form.
For that suppose you have a Static Text field TEXT1 on your layout. Just right click over the text inside this field and on the pop-up choose "Floating Text". It will create a textfield in your subform. Now bind this newly created textfield to the field in the datasource say PERNR in your case.
It will appear like: "The person named is an employee of the company"
In this way you can add a dynamic text in between your static text in a text field.
Regards,
Vaibhav -
Losing variables using loadMovie in input Text Field
Hello! Im trying to load an swf into another swf that has a variable in the text input field. Im a designer and not a programmer but I am using this tutorial to get started in loading a form with a variables in it.
http://www.kirupa.com/developer/actionscript/flash_php_email.htm
What im doing is trying to duplicate is the text box so that when i want to load new_box.swf (with a variable name "company") into main.swf into a movieclip with an instant name "loader." using this:
on (release) {
loadMovie ("new_box.swf", "_root.form.loader");
I can get the movie to load but it loses the variable "company" in the process and when i send the form it doesnt work. If i just keep it in the main timeline it works but not when i loadMovie. Any info would help. Thank you.when you load an swf into another, the _root will refer to the root of main swf.
try add this code to first frame of your loaded swf.
this._lockroot = true; -
Using Group BY with text fields
Hi,
Is there any way around the problem of not being able to
GROUP BY a text field???
I have tried using the CAST (name AS VARCHAR(8000)) but it
doesn't return the full value of the field...... I am getting about
250 characters returned....
Is there any way around this? ,I am assuming MS SQL Server. According to SQL Server Books
Online:
Note: Columns of type text, ntext, and image cannot be used in
group_by_expression.
For GROUP BY clauses that do not contain CUBE or ROLLUP, the
number of group_by_expression items is limited by the GROUP BY
column sizes, the aggregated columns, and the aggregate values
involved in the query. This limit originates from the limit of
8,060 bytes on the intermediate work table that is needed to
hold intermediate query results. A maximum of 10 grouping
expressions is permitted when CUBE or ROLLUP is specified.
Phil -
Is it needed to convert the values frm text field to numeric for sql server
hi all,
i'm using tomvat4.0,back end sql server 200.
when i insert the values in to the table it is giving an exception sayin "Error in converting varchar to numeric"
is it necessary to convert those strings from text fields into int before passing them to the sql query..
i think it is not necessary for oracle..but not sure with sql server..
pls help me
cheers
chanduyap, every thing is fine...
n i got the solution...when the text field is left blank....the requst.getParameter returns [coe]""(null)
wen the database is lookin for a numeric it is giving null...which is not acceptable...
so inserted this code...
if(request.getParameter("...").equals("")) {
//assign zero to a variable then insert that variable....
}thanx for the responses
cheers
May the solutions to one's problem pop up in one's mind itself
chandu -
Please help on how to use variables inside a method call
Hello guys,
How's it goin?
Pardon me if you find my question silly, but I am relatively
new in ActionScript 2.0 programming.
I have here a simple problem. It seems I can't use a variable
inside a method call of an object. Here's the code. Please note of
the authParams string variable below.
import AkamaiConnection;
import mx.services.WebService;
var GeneratedToken:String;
var authParams:String;
// Create a Web Service object
var TokGenService:WebService = new WebService("
http://webservice.asmx?wsdl");
// Call the web service method
var myToken:Object = TokGenService.GenerateToken();
// Create an AkamaiConnection object
var connection:AkamaiConnection = new AkamaiConnection();
connection.addEventListener("onConnect", this);
connection.addEventListener("onError", this);
// If you get a result from the web service, save the result
in a variable
myToken.onResult = function(result)
// If you get a result from the web service, save the result
in a variable
myToken.onResult = function(result)
GeneratedToken = result;
authParams = GeneratedToken +
"&aifp=v001&slist=37414/test/Streaming/";
//Call the Connect method of the AkamaiConnection class
connection.connect("cp37414.edgefcs.net/ondemand",true,true,5,true,false,"443","rtmpt",
authParams);
But then, if I use a hard-coded string value in lieu of the
variable, the method call works!
connection.connect("cp37414.edgefcs.net/ondemand",true,true,5,true,false,"443","rtmpt",
"testStringvalue");
I don't know what I'm missing or what I'm doing wrong... Can
somebody help me please? I am using a 30-day trial version of Adobe
Flash CS3. Also, when I Trace output the variables, the values are
there. It just that they can't be read or recognize inside the
method call. Is this a ActionScript limitation?
Thanks so much in advance!The result param is a returned, “Decoded ActionScript
object version of the XML”. I am not exactly sure what that
means but I have had issues of returned XML values and their
datatype. When I did have these issues I had to cast or convert
into the desired datatype. Try one of the following, assuming the
problem is related to the code that you have bolded.
GeneratedToken = result.toString();
authParams = GeneratedToken +
"&aifp=v001&slist=37414/test/Streaming/";
Or
GeneratedToken = String(result);
authParams = GeneratedToken +
"&aifp=v001&slist=37414/test/Streaming/";
Or
GeneratedToken = result.toString();
authParams = String(GeneratedToken +
"&aifp=v001&slist=37414/test/Streaming/"); -
Need a regular expression for the text field
Hi ,
I need a regular expression for a text filed.
if the value is alphanumeric then min 3 char shud be there
and if the value is numeric then no limit of chars in that field.[0-9].
Any help is appriciated...
thanks
bharathi.Try the following in the change event:
r=/^[a-z]{1,3}$|^\d+$/i;
if (!r.test(xfa.event.newText))
xfa.event.change="";
Kyle -
Use variables inside MovieClip names to call them in ASP 3.
This line of code works fine for me:
this.helpB1Btns.helpB1B3.alpha = 0.3;
But I wonder how can I use variables instead of numbers ( 1 and 3 ) above??
I mean for example:
var i:int = 1;
var j:int = 3;
this["helpB"+i+"Btns.helpB"+i+"B"+j+".alpha"] = 0.3; //Error
["helpB"+i+"Btns.helpB"+i+"B"+j+".alpha"] = 0.3; //Error
this["helpB"+i+"Btns"].["helpB"+i+"B"+j+".alpha"] = 0.3; //Error
For instance, this code works fine:
this["helpB"+i+"Btns"].alpha = 0.3;
(this.helpB1Btns.alpha = 0.3;)
But I have no idea to code this:
this.helpB1Btns.helpB1B3.alpha = 0.3;
I appreciate your help or any refference I could learn this fundamentally?
yours,
Aliahhhhhhh......I was only one DOT wrong and trying different methods for HALF AN HOUR!! lol
I wish Flash was more intelligent to correct such small mistakes!!
Thank you SO MUCH for your reply -
Can somebody help me?! Those people from sprint gave me an iphone 5s locked, even when inasked for an unlocked one, now i'm outside the country and i need to use it with another carrier and it just say: "sim invalid"
You bought a no contract iPhone, not an unlocked one. Had you purchased a Verizon one the GSM side would have been unlocked but you have to follow Sprint's process to unlock the GSM side of their phone. If there is any way possible you need to return this phone and get your money back or sell it and use the money to buy an unlocked iPhone.
-
Variable in Dynamic text field
Hi,
I'm trying to build a custom keyboard into flash to display text in the interface. So far all that I have tried failed, can anyone point me toward a simple script or tutorial that would help me out.
Thank you
Yannok here's a description of the project:
I made a Movie clip containing all the buttons needed to make a QWERTY keyboard, plus some special character. I would like text to appear in a dynamic field when the user click on the button, so they can write text in the field.
So far, I've tried the following code, but it's not working :
Frame 1 :
stop();
var myText:String;
input_txt.text = output_txt.text;
next_btn.addEventListener(MouseEvent.CLICK, nextClick);
function nextClick(myNextEvent:MouseEvent):void {
captureText();
this.nextFrame();
function captureText():void {
myText = input_txt.text+"q";
Frame 2 :
output_txt.text = myText;
back_btn.addEventListener(MouseEvent.CLICK, backClick);
function backClick(myBackEvent:MouseEvent):void {
this.prevFrame();
I'm pretty sure this isn't the most elegant way to do it, I've made it work once in a separate project, but I can't make it work in the new one.
Does this help understand my problem? -
Using variable in accessing itab field
Hi all!
is it possible to access a field of an internal table using a variable.
for example, please see my code below.
DATA: BEGIN OF itab,
field1 LIKE mara-matnr,
field2 LIKE mara-matkl,
END OF itab.
data: v_fldname(5).
**- itab is being populated here -**
v_fldname = 'field1'.
**- i want to access the first field of itab, field1-**
***- but instead of doing this code
write itab-field1.
***- i want to do this...
write itab-(v_fldname).
but im getting an error message saying that <<The data object "IT_VAD" does not have a component called "">>
please send me the correct way to deal with this.
Thanks for your usual support.I dont have a SAP sytem now but This is a sample.
Field-symbols f_field.
Assin a value to the field symbol
Assign f_field value "Field name"
Now the value "Field name" is stored in F_Field. You can use the value as below
v_somefield = <f_field>. " V_somefield will now have a value of "Field name"
- Guru
Reward points for helpful answers -
Need to use variable Local Paths
Hello,
I have a the following snippit, how can I add a variable to the bolded UNC path C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\gpreport.xml
Those paths will change a lot in my scenerio. Thank you.
$file_server = Read-Host "Enter the file server IP address"
(Get-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\gpreport.xml") | ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } | Set-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\gpreport.xml"
(Get-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\Backup.xml") | ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } | Set-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\Backup.xml"
(Get-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Documents & Settings\fdeploy1.ini") | ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } | Set-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Documents & Settings\fdeploy1.ini"
(Get-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Preferences\Drives\drives.xml") | ForEach-Object { $_ -replace "\\99.999.999.999", "\\$file_server" } | Set-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Preferences\Drives\drives.xml"
(Get-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Preferences\files\files.xml") | ForEach-Object { $_ -replace "\\99.999.999.999", "\\$file_server" } | Set-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Preferences\files\files.xml"I'm not sure I understand the question. Are you saying you want the bold part of your path (currently hard-coded) to be in a variable instead? That would look something like this:
$file_server = Read-Host "Enter the file server IP address"
$guid = '{231A178D-DC6C-4186-9575-9C64F07DA5B5}'
(Get-Content "C:\TEMP\GPO\source\5\$guid\gpreport.xml") |
ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } |
Set-Content "C:\TEMP\GPO\source\5\$guid\gpreport.xml"
(Get-Content "C:\TEMP\GPO\source\5\$guid\Backup.xml") |
ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } |
Set-Content "C:\TEMP\GPO\source\5\$guid\Backup.xml"
(Get-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Documents & Settings\fdeploy1.ini") |
ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } |
Set-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Documents & Settings\fdeploy1.ini"
(Get-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Preferences\Drives\drives.xml") |
ForEach-Object { $_ -replace "\\99.999.999.999", "\\$file_server" } |
Set-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Preferences\Drives\drives.xml"
(Get-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Preferences\files\files.xml") |
ForEach-Object { $_ -replace "\\99.999.999.999", "\\$file_server" } |
Set-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Preferences\files\files.xml" -
Need a JavaScript to enable/view Multi-line option for Text fields.
Hello All,
I need a JavaScript to enable/view Multi-line option for all the Text fields in PDF Form.
Assume that I have a PDF form of Fields from F1 to F100 and it contains 25 Checkboxes, 25 Combo Box and 50 Text Fields. Now i need a javascript for which i need to enable Multiline for only Text Fields. So Is there any JS for which i can enable the Multiline option for only Text fields and not for ComboBox or Checkbox.Hi timo,
Thanks for your help. iam trying to use the iteraor approch to do this. but i don't know how to fetch the data entered in the form that was built by the iterator. can you please tell me .
thanks
Maybe you are looking for
-
How do I change the email associated with my revel library?
I changed the email address associated with my Adobe account. when I open Revel with my new address, it does not show any images. if i open Revel with my old address, it shows all of my images.
-
Disk Utility....problems copying DVDs
First off, the DVD's I will refer to are ones I made myself, on this same machine. I'm not duplicating commercial stuff. A while back I successfully used the Disk Utility to make a disc image of an old DVD and make a copy of it. Now, however, I can't
-
Toshiba Satellite L875d-s7230 Running Slow
I have a Toshiba Satellite L875d-s7230 that is running very slow. I completely recovered it back to the Factory out of Box state and its still extemely slow. I have checked the memory using Memtest and checked the Hard Drive and there are no hardwa
-
Suddenly Safari not remembering passwords
Suddenly, it seems have to enter passwords for lots of sites which did not have to before? any idea why this is?
-
Error while installing Device Drivers from Disk1 for Labview 8.2
I am having trouble installing the Device Driver Reference CDs for LabView. I already installed LabView 8.2.1. When I try to install the device drivers from Disk1, I get the following error message : .\UberInstaller.cpp(1458): IInstallerError 10009