Pass variable from ColdFusion to the JavaScript window

Hello world

I have a java script window that will open when the user clicks on the link, my problem is that how can I pass a ColdFusion variable to the window. I use ColdFusion 7 so I can't use cfwindow.what should I put on the place * ? I tried to put EntityId in the location javascript:poponload (EntityId);   and function poponload (EntityId), not ' t not work then please let me know if you know how to do this.

My code:

< SCRIPT language = "javascript" >

function poponload()

{

Window.Open (' test.cfm? test = '* , "mywindow", "menubar = 1, resizable = 1, width = 350, height = 250');

}

< /script >

< body >

< cfform >

< cfset EntityId = '#form. EntityId #" > /i want to spend EntityId to the javascript window "

< / cfif >

< a href = "javascript:poponload();" "> find ID < /a >

< / cfform >

< / body >

Thank you, Rob - appropriateness to the subject, not you (or someone) know what I'm doing wrong with the code below? (the message in the "alert" box is #x #, if the function is not picking up the Coldfusion variable, x). Thanks in advance!

Tags: ColdFusion

Similar Questions

  • How to pass Variables from the Source (SQL) to tab target (JavaBin Shell) in ODI knowledge Modules

    Hi all

    My name is Alessandro and I am new to the community.

    I have a problem with the KM stage custom when I try to pass the variable from the source to the target.

    The ODI version tha I use is the 11.1.1.5.0.

    I created a stage KM following the instructions of the metalink document (Doc ID 728636.1).

    But when I insert the value of the variable in a test table, the value in a table is the name of the variable.

    Where I'm wrong?

    I am doing thi.

    (1) create a step in my goal of shell sql source and javabin KM. In the source tab I get the value of a query, and the name "LAST_UPDATE" column.

    In the target tab, I attribute to the variabile jv_last_update the value of the variable #LAST_UPDATE, with the same name in the selection column.

    source_tab.jpgtarget_tab.jpg

    (2) I created a second stage where I insert into a table of the value of the variable jv_last_update (to debug the value of the variable):

    insert_step.jpg

    (3) when I try to see what I have in the table, the value of any line is the name of the variable "#LAST_UPDATE"; ".

    result_table.jpg

    Thanks in advance


    Alessandro

    Hi Alessandro,.

    Interesting... I have not read the Oracle document you sent yet, but one thing I can guarantee you, is that it doesn't. If Oracle says that it should work, maybe it's a bug, or maybe he has changed on new versions of ODI. I am also on ODI 11.1.1.5 and I tried many different ways to pass SQL results to variables of java with all sorts of different labels, but none of them worked for me as well. But I managed to use it in a different way, so please see below if it matches your needs:

    We are just one step. The second is just to show that it worked:

    In the first step, on the source tab, select Oracle and point to the logical schema that you want to run the query:

    On the target, note the following Java BeanShell code with the SQL that you want to run:

    Now your variable must have the correct value of your SQL. To test it, I just write a comment 'Raise' to Jython in the second step:

    The result is 'X' as expected:

    It will be useful.

    Thank you!

  • Pass Variables from JavaScript CS3 ActionScript

    Hello

    I can't understand what I'm doing wrong and I need help . Who better to ask than legal experts?

    I have everything works fine so far except for this actionscript. I use CS3 Flash with ActionScript, CS3.

    I have 5 buttons in flash.
    I try to perform the following tasks
    1. ensure buttons with effects in flash - done
    2 put the button in the down position based on the Web page that the user is on.
    To perform this dynamic, I apparently have to use 3 different languages, PHP, JavaScript, ActionScript.

    I've been playing with this during a week and can not understand. I have the rest of the scripts tested and verified to work.

    Here is the link to my test page
    http://www.spectacularstuff.com/PHP-test/inProgress/php-URL-detection.php

    Here is my code for the test. (This does not include the buttons. It is simply to test to see if I'm passing variable.)

    PHP code to detect the file name.
    <? PHP
    function curPageName() {}
    Return substr ($_SERVER ["SCRIPT_NAME"], strrpos($_SERVER["SCRIPT_NAME"],"/") + 1);
    }
    ECHO "is the current name of the page detected by PHP". curPageName();
    ? >

    The JavaScript Code to pass variables to the Flash
    < script language = "javascript" src = "swfobject.js" >
    var so = new SWFObject ("php - url - detection.swf", "php-url-detection", "550", "400", "9", "#FFFFFF");
    so. AddVariable ("currentpage","<? php echo curPageName();? >" ")
    < /script >

    ActionScript Code to get the JavaScript Variables and display them in flash.
    Dynamically create text fields
    var tf:TextField = new TextField();
    tf.autoSize = TextFieldAutoSize.LEFT;
    TF. Border = false;
    addChild (tf);

    var tf2:TextField = new TextField();
    TF2. AutoSize = TextFieldAutoSize.LEFT;
    TF2. Border = false;
    addChild (tf2);

    Create the variable to write to the page
    var myStr2:String;

    first attempt to put the variable on the page.
    This LoaderInfo must be capitlized. An error occurs if not.
    var paramObj:Object is LoaderInfo (this.root.loaderInfo).parameters.currentpage;.

    second attempt to put the variable on the page
    var myStr:String = this.root.loaderInfo.parameters.currentpage;
    trace (paramObj);
    trace (myStr);

    If (myStr is nothing)
    {
    myStr = "Flash is not reading JavaScript variables.:(";).
    myStr2 = "";
    }
    on the other
    myStr2 = "" Flash read the JavaScript variables! :)) ' "

    TF. Text = myStr; Display the URL on the page
    TF2. Text = myStr2 //Display Flash is happy

    [- End of Code-]


    Help, please.

    Thank you in advance.

    Wayne

    I found an answer to this for someone looking for an answer. I wrote the answer in another forum:
    http://Board.flashkit.com/Board/ShowPost.php?p=3946455&postcount=31

  • How to pass variable from bean to resourceID for the document map?

    Hello experts, I have added WebCenter workflow Microsoft document explore task in my ADF which as a parameter called resourceId.   I want to pass variable bean to this setting, because the content ID (doc name or ID) are determined dynamically.

    When I provide ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} as a resource in the expression ID, it works very well.    But samething if I attribute to a bean bean variable and entitlement in the form ${sessionScope.MyBean.docName}, it evaluates the variable bean in the form ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} and then below throws the exception:

    [2013-10 - T 02, 14: 34:50.369 - 04:00] [DefaultServer] [WARNING] [WCS-07219] [oracle.webcenter.doclib.internal.view.backing.ContentProvider] [tid: [ASSETS].] [ExecuteThread: '10' for the queue: "(self-adjusting) weblogic.kernel.Default"] [username: anonymous] [ecid: d50192415c689920:-7d97126c:1417a5d6a49: - 8000 - 000000000000008 a, 0] [APP: CreateContactWSProxy] invalid parameter combination: the login name specified by resourceId = ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} is not specified in the parameter connectionName = UCM57Server.

    Variable bean is defined as:

    private String Nomdoc = "${" UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI "} ;

    Please give me some advice on how to pass the value to resourceId dynamically via the variable of bean.

    Thank you.

    private String Nomdoc = "UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI";

    Without $ {}

  • Passing variable from one form of the APEX to PL/SQL open the link in a new borwserwin

    Hi all

    I received a form of apex based on a query like:

    'INTERFACE_NAME ',.
    'INTERFACE_NAME' INTERFACE_NAME_DISPLAY,
    "PRIORITY."
    "HAS_STARTED,"
    "EMAIL_TO"
    'STATE ', HE SAID.
    of ' #OWNER # '. " INTERFACES.
    where = 'INTERFACE_NAME': P2_INTERFACE

    only the State of the field is updateble.
    It is only allowed to update data in the DB table with a PL/SQL procedure:

    Start
    set_interface_vals@DB (p_interface_name = >: INTERFACE_NAME, p_state = >: STATE);
    end;

    I put the prodzedure in a process of Page who act with a "submit" button.
    Now to my problem: How can I get my field INTERFACE_NAME and STATE values. the way I did here does not work.


    Thanks for your help.

    with regard to the sia

    Published by: sia on March 14, 2011 17:46

    Pls update your handful of forum to something more addressable.

    On your question about the opening of the link as a new, blank page, assume that the URL is 'http://www.google.com '.
    change the URL of the button to

    JavaScript:Window.Open ('http://www.google.com');

    or

    JavaScript:popUp2('__http://www.google.com');

  • Passing variables from flash to php script - does not!

    Hey everybody. I was wondering if someone could help me. I use as2 to pass a variable from flash to my php and nothing happened! Here's the action script code that I put on my button:

    (release)

    {

    Amount.Text = 5;

    Form1 = new LoadVars();

    Form1.amount = amount.text;

    form1.sendAndLoad ("http://mywebpage.com/test.php", rise, "POST" ');

    }

    The amount of '5' is now in a dynamic text field with the variable name and instance of amount (which, in the future, will be hidden). This works very well when the button is clicked. What I'm trying to do without success, is to get this value of '5' to my test.php and did echo and it happens simply not . It comes to my php script:

    <? PHP

    $form_inp = $_POST ["amount"];

    If ($form_inp == "'")

    {

    Print "nothing entered < br >".

    }

    on the other

    {

    Print "you entered: $form_inp";

    }

    ? >

    I'm getting "Nothing entered" every time.

    I've tried different ways for the amount.text such as:

    (release)

    {

    Amount.Text = 5;

    Form1 = new LoadVars();

    Form1.amount = this. Amount.Text;

    form1.sendAndLoad ("http://mywebpage.com/test.php", rise, "POST" ');

    }

    and

    (release)

    {

    Amount.Text = 5;

    Form1 = new LoadVars();

    Form1.amount = this ._parent. Amount.Text;

    form1.sendAndLoad ("http://mywebpage.com/test.php", rise, "POST" ');

    }

    etc...

    I also tried to change the variable name in the function sendAndLoad amount to form1 as follows:

    (release)

    {

    Amount.Text = 5;

    Form1 = new LoadVars();

    Form1.amount = amount.text;

    form1.sendAndLoad ("http://mywebpage.com/test.php",form1, "POST");

    }

    and still nothing.

    In my php file, I even tried the GET instead of the POST and it always turns out nothing.

    <? PHP

    $form_inp = $_GET['monto"];

    If ($form_inp == ")

    {

    Print "nothing entered < br >".

    }

    on the other

    {

    Print "you entered: $form_inp";

    }

    ? >

    Additional info:  I put the .swf file and at the same level-.php file in the same folder on my server just to be safe, and the dynamic amount.text text field and button are at the same level in the .swf file.

    Anyone can shed some light on my situation... pretty please? I'm out!

    Thank you very much.

    Ok. So, do not let this thread unanswered, after a looooooong of trial and error, I went to as3 and began to do some testing. It turned out that the register_globals was off on my site and that is why I did not receive the variable passed with the $_POST in my php. So what I finally proposed is the following:

    In my fla/swf doc:

    to import flash.net.URLVariables;

    import flash.net.URLRequest;

    import flash.net.sendToURL;

    var urlVariables:URLVariables = new URLVariables;

    urlVariables.amount = "5";

    var urlRequest:URLRequest = new URLRequest ("http://mirador.mx/oaxaca/disco/receive_test.php");

    urlRequest.data = urlVariables;

    sendToURL (urlRequest);

    In my php file:

    $amount = $_GET ["amount"];

    echo "' AMOUNT IS:". " $amount;

    Now for all of you who have been following this thread, or which can be read in the future, I know that we we started with AS2 and finishing here with AS3 but I didn't know why it worked until I I'm so fed up I've changed in AS3 to see if I could understand. I, like many others I guess, felt a bit intimidated with AS3 and was unwilling to give it a try, but I highly recommend that you dive into it because once get you a grip on it is much more functional.

    So I m going to mark this thread as a response and hope it saves someone else all the time and the frustration that he made me... Good programming!


  • How to pass in HTML format in the compose window

    I have normally compose messages in plain text and sign them digitally. However, on occasion, I would like to include a photo, so I want to switch to HTML format. The only way I found to do this is to change the account setting before inserting a composition window. I'd rather go to HTML for just this message, and do it from the compose window. Have a missed a feature that makes it somewhere?

    Hold down the SHIFT key when you click on write, reply, or forward, and the format of the message will be opposite the one defined in the account settings.

    If HTML is the default, you can change the Format of delivery under Options in the entry window, but you can't do the same thing if the default is plain text.

  • Not able to copy/paste in the javascript window

    Hi all

    I have captivate 8.0.0.145 and I'm creating a tip action that executes a javascript script.

    I have my code in Notepad ++ and I want to copy and paste the code written in Notepad ++ to javascript window, but no matter what I do, when I hit the button ok my code dispersepears.

    022016_javascript.png


    Someone at - it the same problem?

    Thanks in advance.

    Rosalie

    Bit off-topic, but please install the patch to upgrade to 8.0.1, always use you first version (several bugs).

    For JS: This might be the reason, you are unable to insert the code (create functions) in the JS file and call the function in the JS command in the tip action?

  • ADF: Session timeout problem using the JavaScript window.open() method

    Hi all

    I have a commandImageLink on my page, with partialSubmit = true, clientComponent = true. ClientListener the link calls a JavaScript onClick, the fire with a clientAttribute that contains the URL for the managed bean.
    It works very well - the new window opens successfully. But the performance of any activity on the parent window, the session expires immediately.

    The ciLink aims to open the URL in a new window and I can not change this feature.

    I've tried (and failed)-
    1. put the ciLink within the tag < h:form > and using target = "_blank".
    2 actionListener on ciLink to JavaScript fire.

    I use JDeveloper 11.1.2.1 with weblogic 10.3.6, JSF 2.0.

    Thank you
    Yacoub

    Hi Anirban,

    Try to change the session cookie in weblogic.xml, seems to be cleaned each time that you access the external link:

    
      JSESSIONID-MYAPPLICATION
    
    

    AP

  • Problem passing variable from PHP to Flash

    I'm moving a single variable from PHP to Flash. However, I can't quite make it work.

    In a PHP file named data.php, I use:
    "$query = SELECT SUM (Debt) As Total OF THE debtclock;
    $result = mysql_query ($query);
    $debt = mysql_result ($result, "Total");
    Print "debttotal = $debt";

    In Flash 8 Actionscript, I use:
    loadVariables("data.php","0");

    If I understand correctly, this should make the variable available in Flash debttotal.

    Can someone tell me where I'm wrong?

    Try this:
    loadVariables ("data.php", _level0);
    The 2nd parameter specifies the target that receives variables, '0' is not a valid value for this. With _level0, variables will be found in the root timeline, so you can access it with _root.debttotal (from _level0) or _level0.debttotal (on a different level than _level0).

    Welcome,
    blemmo

  • Simple task - syntax Question (how do you pass variables from one component to another component - databinding)?

    Hi all

    I'm moving some width/height/URL of a Video Player component to a Social Bookmarking component incorporate text entry field. (for people capture and share videos).

    I know that it's a simple task, but it's the end of the day and I seem to have a brain failure... What is the syntax to achieve this? Do I have to import the video player component? These widths/heights/URLs are all generated dynamically by a XML... should I be pulling the XML or reuse just variables already existing in the Video Player component?

    Here is my code...

    Video player:

    [Bindable]

    var public source: String = "";

    [Bindable]

    public var autoPlay:Boolean = false;

    [Bindable]

    public var fullScreenMode:Boolean = false;

    [Bindable]

    public var clipTag:String = '_movie;

    [Bindable]

    public var iag_code:String = "";

    [Bindable]

    public var officialURL:String = "http://www.movies.com/"; ""

    [Bindable]

    public var referer:String = 'unknown ';

    [Bindable]

    public var gID: String;

    [Bindable]

    public var starterImageURL:String = 'http://www.movies.com/jazzmaster/images/default_starter_image.

    [Bindable]

    public var oldWidth:Number;

    [Bindable]

    public var oldHeight:Number;

    Component sharing:

    < mx:HBox

    Height = "10%".

    horizontalCenter = "-25".

    Red = '0 '.

    paddingBottom = "5" >

    < mx:Text text = "" Embed Code: "paddingTop ="1"color ="#FFFFFF"fontSize ="12"/ >"

    < mx:TextInput text = "{oldWidth}" / >

    < / mx:HBox >

    The above code generates an error... "Any attempt of property inaccessible oldWidth via a reference with a static type com:SharingBookmarks."

    Thank you all!

    DK

    Try this...

    Create a flex project and add a folder called 'src '.

    create a new component MXML named "VideoComp.mxml" and copy/paste

    http://www.Adobe.com/2006/mxml"width ="400"height ="300">

    [Bindable]

    public var videoWidth:int = 300;

    [Bindable]

    public var videoHeight:int = 300;

    ]]>

    create a new component MXML named "SharingComp.mxml" add copy/paste this...

    http://www.Adobe.com/2006/mxml"width ="400"height ="300">

    [Bindable]

    public var videoWidth:int;

    [Bindable]

    public var videoHeight:int;

    ]]>

    and here's the main.mxml file

    http://www.Adobe.com/2006/mxml '.

    xmlns:src = "src.*" >

    private void doSomething (): void

    {

    sharingComp.videoHeight = videoComp.videoHeight;

    sharingComp.videoWidth = videoComp.videoWidth;

    }

    ]]>

    Hope this helps,

    BaBo,

  • Passing variable from one page to the other

    Hello

    I'm probably missing the boat full of something because I tried everything I found on this forum and it still does not work. I am trying to pass a value entered in a text field (Item = P1_TXT_1) on page 1 to page 2 when I click on a button. The button is configured with the URL redirection as an option to the Page 2 with the "game of these values (P1_TXT_1) with these values (& P1_TXT_1)." In the end, I use this variable in a query in report on page 2 (emplid =: P1_TXT_1).

    Joe

    Published by: JoeCO on March 18, 2009 10:44

    >
    set these values (P1_TXT_1) with these values (& P1_TXT_1)

    the two above the variable seems to be... I think it must have been P2_TXT_1 WITH & P1_TXT_1 and emplid =: P2_TXT_1

  • [CS4/JS/AS] doScript pass variable from JS to as.

    I have this doScript I want to pass a variable (theFold) to the AppleScript, he appealed:

    #target "inDesign - 6.0.

    var theFold = ["Spotlight"]

    var myScriptFolderPath = ("" HD:Users: user: Desktop Macintosh: unlock V3.app: "");

    app.doScript (file (myScriptFolderPath), ScriptLanguage.applescriptLanguage, theFold);

    AppleScript is:

    adding property: "Macintosh HD:Users: user: Desktop:

    on the run (fromJava)

    tell application "Finder".

    set name2 to (fromJava text)

    set theName to add & name2 as alias

    my openSez (theName)

    end tell

    end of race

    on openSez (theName)

    tell application "Finder".

    updated folderContents (items in folder theName)

    if (folderContents count) > 0 then

    -scroll through each item in the folder

    repeat with i from 1 to count the folderContents

    put carryThrough (section i of folderContents)

    -if this is another folder, then recurse

    if carryThrough is 'file' then

    set theName to (carryThrough as string)

    my openSez (theName)

    else

    is locked to carryThrough is true then

    locked carryThrough false game

    end if

    end if

    end repeat

    end if

    end tell

    end openSez

    Is it possible to pass a variable when calling a script from a path?

    I get the error "cannot make < script > in Unicode text.

    Thanks for any help or comments.

    Peter

    The variables are passed to a variable called arguments. You don't need an execution handler or anything like that, just:

    Name2 ((point 1 deles de arguments) text value)

    end of race

  • BlackBerry Smartphones pass photos from BB to the PC

    The pictures stored in the card media on my Bold 9650 appear not on the BB desktop software to transfer them to my PC. I can see the photos on my BB. The software shows the map of media in areas of device options and shows how it is free. When I click on images in the Media Sync I get the message "no available pictures - there no pictures to import from your device.

    I also see the image files using folder in my windows management areas, but of course it is not good to copy on my PC directly because they are encrypted and cannot be opened.

    Thoughts? Thank you!

    Ahhhhh... Yes, a policy IT (which would have been my next guess, I promise you! ). If this is the case, then you need to talk to them and these KB may apply:

    • KB21172 How to remove the microSD card encryption
    • KB15244 What is Content Protection and encryption on BlackBerry smartphone
    • KB11963 How do I change the setting for the Protection of the content on the BlackBerry smartphone

    It can be much more than the it policy is limit exactly what you are trying to (copy to the PC things of the BB). You should probably talk to them before being certain of what they block, and that they do not block.

    Good luck!

  • Install windows from DVD removes the original windows supplied with my notebook recovery?

    recently I formatted my laptop with a DVD of Windows 8.1 only language, but I want to install windows and settings that came with my laptop.

    recently I formatted my laptop with a DVD of Windows 8.1 single language but I want to install this windows and settings that came with my laptop.

    Hello

    It may or may not.

    We have no idea how you have it installed.

    When you install from the DVD, you choose what happens with partitions.

    If you don't know what you're doing, look in disk management and see what are the partitions on your hard drive, even if the recovery partition is still there.

    And maybe it's still there does not say that it is still accessible after you do what you were doing.

    Ask the manufacturer what key/s support to start reinstalling the OS and see if it still works or not.

    See you soon.

Maybe you are looking for