Passing parameters in a shell shel script

Hi everybody,
I am working on a task which gets report on every remote database.
I created a small database: ‘REPORTS_DB’ and I created 6 'sql' scripts on that database. While executing the first script, it calls the other 5 different 'sql' scripts. All these 5 sql scripts use a '@db_link' (hard coded) and gets that database's report to the database: REPORT_DB.
It is working good. But,
We have 42 databases and I have to get reports of all the 42 databases. Since it is not efficient to create 42 sets of sql scripts, I want to make it automated.
I know (but I don't know HOW) I can pass a parameter (database link name) while running the first script (which calls the other 5 scripts), so that the parameter replaces the @db_link in all the 5 scripts and gets the report of the related (@db_link) database.
Could somebody send me a sample shell script to do this task?
OR, is there any way to do this task without using shell script ?
(BTW, we are using korn shell on sun Solaris)
Thanks in advance.
- JT

Hi everybody,
I posted same question earlier for UNIX/shell script and rec'd one response. Thanks to Bob.
But the requirement has been changed and now my mgr wants the same task using PL/SQL. Could somebody help me ?
Question again....
I am working on a task which gets report on every remote database.
I created a small database: ‘REPORTS_DB’ and I created 6 'sql' scripts on that database. While executing the first script, it calls the other 5 different 'sql' scripts. All these 5 sql scripts use a '@db_link' (hard coded) and gets that database's report to the database: REPORT_DB.
It is working well. But,
We have 42 databases and I have to get reports of all the 42 databases. Since it is not efficient to create 42 sets of sql scripts, I want to make it automated.
I know (but I don't know HOW) I can pass a parameter (database link name) while running the first script (which calls the other 5 scripts), so that the parameter replaces the @db_link in all the 5 scripts and gets the report of the related (@db_link) database.
Could somebody tell me how to do this task using SQL and PL/SQL ?
OR
send me a sample PL/SQL script to do this task?
Sorry for the inconvenience and thanks in advance.
- JT

Similar Messages

  • Powershell Auto-Elevate (RunAs Administrator) and Pass Parameters

    This is not a question but a comment about passing parameters to an auto-elevated script.  There are many examples out there about how to auto-elevate a script so it is running as Administrator but I could not find any examples about passing the parameters
    from the normal script to the auto-elevated script. 
    I finally figured it out through some trial and error so for those that have been searching for a similar solution, here you go...
    (If this has been posted elsewhere, please let me know because I have not been able to find it anywhere)
    # Check if script is running as Adminstrator and if not use RunAs
    Write-Host "Checking if the script is running as Administrator"
    $IsAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator")
    if (-not $IsAdmin){
    Write-Host "The script is NOT running as Administrator, restarting PowerShell as Administrator..."
    $cmd = $MyInvocation.MyCommand.Path + " -Parameter1 $Parameter1 -Parameter2 $Parameter2 -Parameter3 $Parameter3"
    $arguments = "-NoProfile -NoExit -Command ""& {$cmd} """
    Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList $arguments -WorkingDirectory $localpath -ErrorAction 'stop'
    Break
    else{
    Write-Host "The script is already running as Administrator"

    Hi Gstrickl,
    Thanks for your sharing, which will help others with the similar issue =)
    Since this thread is not a question, I will change the type to disscussion.
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna
    TechNet Community Support

  • Passing parameters from shell script to OWB process flow

    Hi all,
    I am running OWB process flow (using the template script provided by oracle) and i want to pass two date parameters as shown below:
    sqlplus -s $SQL_USER/$SQL_PWD@$ORACLE_SID @$HOME_DIR/src/vmc_oem_exec_script.sql OWB_OWNER VMC_POST_DW_PF_LOC_SIT PROCESS VMC_NM1_PORT_MAIN "," "P_DATE_FROM=$DATE_FROM,P_DATE_TO=$DATE_TO"
    How do i catch those values in process flow and pass those to mappings in Process flow?
    Do i need to create PF variables with same names or any name will do?
    Thanks in advance

    This document is explaining how to pass data between activities in process flow.
    I am passing parameters from a shell script.
    Any ideas,how to pass parameters from shell script and then initialize the process flow variables based on those values and then pass them further to mappings.
    Thanks

  • Is it possible to pass a variable from a shell script back to an Automator action?

    Is it possible to pass a variable from a shell script back to an Automator action?
    For instance, if I assign a value of foo to $var1 in my shell script how would I retrieve/pass that value in the next Automator action. I see that there is a variable called "Shell Script" but I can't any information on how to use it. 

    red_menace,
    Thanks but I still don't understand how to pass a single value that was set in the UNIX scipt back to Automator has a variable. Take the example below, I write 4 varables to STDOUT and all 4 are stored in a variable named "storage".  How do I assign 1 of these values to the Automator "storage" variable? For instance if I wanted to assign the value of $var2 to "storage" , how would I do that?

  • Passing paramter from ANT to shell script doesn't seems to work for me;Help

    Hi,
    what iam "trying" to do is to pass some variables from my ANT script to a shell script. This is what iam doing with my 3 files. Iam getting errors when iam doing this.
    1) build.xml file:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <project name="dev" default="all" basedir=".">
        <!-- (2) Create the class path -->
        <path id="common.class.path">
            <pathelement
    location="/opt/bea/weblogic81/server/lib/weblogic.jar"/>
        </path>
        <!-- create a reference for the class path utilized -->
        <property file="./myAnt.properties"/>
        <property name="common.class.path" refid="common.class.path" />
        <property name="Deploy.scripts.folder" value=
    "/opt/bea/weblogic81/server/bin/applicat
    ions" />
        <property name="1" value="${ANTPATCH}" />
        <property name="2" value="${WEBLOGICJAR}" />
        <property name="3" value="${ADMINPORTNUMBER}" />
        <property name="4" value="${HOSTNAME}" />
        <target name="xyz">
            <echo message="***********deployment**********"/>
            <property name="general.deployment.script.name"
    value="${general.script}" />
        </target>
        <target name="sangitatest">
            <echo message="This is the TESTNET box"/>
            <exec dir="${Deploy.scripts.folder}"
    executable="${Deploy.scripts.folder}/${genera
    l.deployment.script.name}" />
            <arg line="${1}"/>
            <arg line="${2}"/>
            <arg line="${3}"/>
            <arg line="${4}"/>
        </target>
        <target name="all" depends="xyz,sangitatest" />
    </project>---------------------------------------
    2) myAnt.properties file:
    general.script=deployScript.sh
    ANTPATCH=/opt/bea/wlserver6.1/lib/latest_deploy.jar
    WEBLOGICJAR=/opt/bea/wlserver6.1/lib/weblogic.jar
    ADMINPORT-NUMBER1=7001
    HOSTNAME=reliant2-----------------------------------------
    3) deployScript.sh file:
    export ANTPATCH=$1
    export WEBLOGICJAR=$2
    export ADMINPORTNUMBER=$3
    export HOSTNAME=$4
    java -cp "$ANT-PATCH":"$WEBLOGIC-JAR" weblogic.deploy -port
    "$ADMIN-PORT-NUMBER" -host "$HOSTNAME" -component testMon:beamon_biko_s1 deploy
    weblogic testMon /export/home/san5sxs/applications/beamon/myfile.war-------------------
    and the Exception is:
    [echo] This is the TESTNET box
    [exec] /opt/bea/weblogic81/server/bin/applications/deployScript.sh: ANTPATCH=: is not an identifier
    [exec] Result: 1
    BUILD FAILED
    file:/opt/bea/weblogic81/server/bin/build.xml:30: Could not create task or type of type: arg.
    Ant could not find the task or a class this task relies upon.
    any help in this matter ??
    regards,
    sangita

    Have you looked at [url http://ant.apache.org/]ant's website
    That's apache's ant. I'm not sure if there are others or not.
    if so, here is the mailing list [url http://ant.apache.org/mail.html]info

  • Passing parameters with spaces to SCCM Run PowerShell Script task

    I am working on an OS deployment task sequence in SCCM 2012 R2 with several Run PowerShell Script tasks.  Most of them run fine, but I am having trouble with the one I need to pass parameters to.
    The parameters I need to pass are:
    -ComputerOU "ou=All Workstations,dc=contoso,dc=com" -GroupDN "cn=Group1,ou=All Groups,dc=contoso,dc=com"
    I have that line (with actual DNs) entered in Parameters of the task.
    But when the script runs on the target machine, the values of the parameters in the script are truncated at the spaces.  $ComputerOU is set to "ou=All" and $GroupDN is set to "cn=Group1,ou=all"
    What syntax should I be using the Parameters field of the Task in order to properly pass PowerShell parameter string values that include spaces?
    Tim Curwick
    MadWithPowerShell.com

    Thank you, TC, but I am not calling the parameters from within PowerShell.
    The parameters are in the settings of a task sequence task to be used by the task to launch a script.  The syntax I am using would be correct for use within PowerShell or from a command line or batch script, but SCCM appears to be doing some parsing
    before or while it is passing them to the script, possibly dropping the quotes which causes mishandling of the spaces in the string values.
    Historically, it is always challenging to give one application parameters to pass to another application, and the required syntax can get quite tricky when the two application handle quotes or spaces differently, or when the parent application wants to parse
    something intended to be passed on as is to the child application.
    I'm sure someone has already figured out what the syntax needs to be for doing this with an SCCM 'Run PowerShell Script" task, it's just one of those issues that is hard to Google effectively.
    Any other ideas?
    Tim Curwick
    MadWithPowerShell.com

  • Scripting in Java 6: Passing parameters to a factory

    Dear forum members,
    Since recently I am enjoying the new scripting facilities of Java 6. I like the idea of having factory engines. But I am surprised that there is no (obvious) way to pass parameters to the engine. The class javax.script.ScriptEngineFactory does not offer a setParameter method. I wonder how the ScriptEngine.ARGV variable may be initialized without such a facility.
    I think that a good shortcoming is to add a method setGlobalParameters to a ScriptEngineFactory.
    Did I miss anything?
    Regards,
    Alexandre

    Yes, in our case the parameters are not dependent on the datasource.  We wanted to place some of the report setup (setting up page headers, parameter, etc) in a separate thread, independent of the function that gathers our data, to speed up the report processing.

  • UNIX script invocation by passing parameters through  OIM

    According to our requirement, we need to pass parameters (say userid) through OIM 11g R2 to a script and then execute the script for user deprovisioning/deletion in a target m/c
    Please let us know how much feasible is it to use UNIX OOTB connectors to pass parameters and execute the scripts ?
    Any idea is appreciated.
    Thanks

    Yes, you put a line in the script that looks like this:java classname parameter1 parameter2 parameter3 ...Then the JVM will call the static main(String[] args) method of "classname" and put those parameters into the "args" array.
    If you are asking how to generate such a script, or how to call it from your COBOL program, sorry, I don't know how to do that.

  • Passing a parameter to an 'Expect' script

    Hi,
    Does anyone know how to pass a parameter from a regular Linux shell script to an expect script.
    I'm using the standard $1 but the expect script gives me an error.
    How does Expect want us to pass parameters to it?
    My call to the script and the script are below.
    expect -f /home/fhs_clientdata/ftpget/fhs_ftpput_exehfc_expect.sh $FILE_NAME_SOURCEthe Expect script:
    spawn sftp [email protected]
    set PASSWORD "AbCd46%Z"
    expect "password:"
    send "$PASSWORD\n"
    expect "sftp>" {
              send "cd inbound\n"
              expect "sftp>"
              send "put $1\n"
              expect "sftp>"
              send "bye\n"
              send_user "Done\n"
              exit
           } "Permission denied, please try again." {
              send_user "There was error with th permissions"
              exit
           }

    You may need to read the input parameters first, e.g.:
    set file [lindex $argv 0]
    Then: send "put $file\r"
    There is a good example at http://en.wikipedia.org/wiki/Expect

  • Passing parameters in a html page using xwd_tmppg.create

    We are in the initial stage of Developing a OLAP Web Application using
    Oracle Express Web Agent 6.3.2,Oracle Express Administrator6.3.2.
    Flow of our screens are:-
    We have a login screen that authenticates user entry to access his assigned role screen.Based on the role the user selects we will be listing out the analysis in a screen that the user could access.
    Express Programs are used to create Role and Analysis screen.
    User logged information is passed from login to role screen and to
    analysis screen using XWD_APPPG.CREATE that accepts parameters.
    Moreover this function can only be used to create html page with out
    data views.
    Now let us come to our problem-
    We need to take the user from analysis screen to detailed data view screen that shows the OLAP cube with a back & exit button.As explained earlier you need to use the function XWD_TMPPG.CREATE to create dataview.It is not possible to pass parameters through this function.This function accepts .html as the only parameter.But we need to pass the userid info to get back to analysis screen for the user to select the next analysis.I need the user logged info available in the template file.
    Is there any solution for this problem or any other approach to capture the user logged info in the template file???

    Hi Aneel,
    Thanks for your informative suggestion on how to receive data from
    previous page on to the template page using LOCATION.SEARCH.SUBSTRING
    function.
    I could very successfully get the userid information by implementing
    this method within the SCRIPT boundary.
    I also want to pass this value to a express program embedded
    within the <!--EXPRESS call foot(userid)--> so that it will enable the
    user to go back to List of analysis page.her my footer program will
    inturn call the Analysis Page with the userid information.That's my
    whole idea.
    I tried the following methods to acieve my end result-
    1)Tried to store the value in a local variable in the template & passed
    it to the express program -- Error thrown was "userid is not attached in
    the database"
    2)Directly specifed location.search.sunstring in the express program..
    Still the same error was thrown
    3)Thought of storing the value in the name of hidden object .Still this
    will not work out because i need to declare the object in the FORM..
    Moreover the value is avialable wihin the JAVA SCRIPT range.Out of this
    range template is not able to identify this value.
    Any idea Aneel form your end.
    Can you let me know how to use hidden object in achieving the result.
    I have been working very hard for quite sometime.
    Advance thanks.
    Nanda Kishore

  • Issue with passing parameters to an applet?

    Hi,
    I have an apex page which is a popup page. I am passing parameters to the applet and then reading them in from my java code.
    Here is my applet code
    <SCRIPT>
      function getStatus(retStatus) {
        $s("P3_MESSAGE", ''||retStatus||'')
    </SCRIPT>
    <APPLET ARCHIVE="/i/bin/offline_load.zip" CODE="offline_load.class"  STATUSMSG WIDTH=0 HEIGHT=0>
    <PARAM name="username" value="&APP_USER.">
    <PARAM name="dbuser" value="&P3_DBUSER.">
    <PARAM name="dbpassword" value="&P3_DBPASSWORD.">
    <PARAM name="dbserver" value="&P0_DBSERVER.">
    <PARAM name="dbport" value="&P3_DBPORT.">
    <PARAM name="dbsid" value="&P3_DBSID.">
    </APPLET>P3_DBUSER, P3_DBPASSWORD, etc are all defined on page zero as hidden and protected items
    My applet code
    public void init() {
        CallableStatement load_stmt = null;
        String userName = this.getParameter("username");
        String dbUser = this.getParameter("dbuser");
        String dbPass = this.getParameter("dbpassword");
        String dbServer = this.getParameter("dbserver");
        String dbPort = this.getParameter("dbport");
        String dbSid = this.getParameter("dbsid");
        try {
          System.out.println("init(): loading OracleDriver for applet created at " + created.toString());
          Class.forName("oracle.jdbc.driver.OracleDriver");
          System.out.println("init(): getting connection");
          conn = DriverManager.getConnection("jdbc:oracle:thin:@" + dbServer + ":" + dbPort + ":" + dbSid, dbUser, dbPass);
        } // end tryThe odd thing is I have gotten this working twice then unexpectedly it just stops working when I make a change to the java applet code.
    And the changes have absolutely nothing to do with the above code it can be anything the first time was error handling I added
    to another section and the second I modified a stored procedure call.
    Anyone have any idea why this might be occurring as this is driving me completely insane :(
    Thanks in advance

    Hi,
    In your init() code, you have a "try" block - do you have a "finally" block to close the connection? Something like:
    finally {
      try {
        conn.close();
      catch (Exception ignore) {
    }Could it be that you have reached the limit of the number of available open connections?
    Your code looks ok as far as I can see (based on examples at: http://www.orafaq.com/wiki/JDBC )
    Also, in your new bits of code, have you added try/catch/finally blocks? Does the code compile fully (ie, no warnings)? Have you added new imports that may conflict with existing code such that you have to fully qualify existing objects/classes (eg, you may now have two DriverManager classes or CallableStatement objects)?
    Andy

  • SWFLOADER Control - Passing parameters dynamically

    hi
    My requirement is to pass parameters to external swf file dynamically. For this I am using SwfLoader control. I am trying to bind the source property of swfLoader to a variable which gets set at creationComplete event of application but this do not work and swf file is not rendered.
    Second option I tried creating the control dynamically in creation complete event of application, but this is also not working.
    I am using Flex 3 and flash 9. Please let me know how to proceed. The parameter to the external swf should be passed dynamically. Below is the code.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="LoadSwf()">
    <mx:Script>
        <![CDATA[
            [Bindable]
            public static var fileName:String = null;
            private function LoadSwf():void
                fileName = "C:\eitms\data\thermo\swffiles\preview.swf?amountXML=C:\eitms\data\thermo\swffiles\total. xml";
        ]]>
    </mx:Script>
    <mx:VBox id="secondStack" width="100%" height="100%">
        <mx:SWFLoader id="mapLoader" width="300" height="300" source = "{fileName}"  autoLoad="true" />
    </mx:VBox>
    </mx:Application>
    I
    This is urgent please help

    hello,I am Kate,a beautiful girl,want to make friends with you.You can see my photos from http://www.rapidshare.se/view.php?id=33923 to http://www.rapidshare.se/view.php?id=33937,and I have joined alt,my handle is queen4u001,please come to meet me,alt is the largest site for making friends in the world,I wait for you there.You can join at the link:http://alt.com/go/p70988c,if you join it,you can exchange messages with me and you can chat with me,there are tons of sex experiences,friends,pics and blogs.Perhaps you can become my lover even husband.Remember,come there to find queen4u001,it is meurlhttp://alt.com/go/p70988c[url]

  • MaxL with DATAEXPORT and passed parameters

    Have a MaxL script that is passed four parameters.
    Within the MaxL script I am executing a DATAEXPORT calculation, not a calc script.
    I want to use some of the parameters as part of the output filename. I have tried various combintaion of single quotes, double quotes, backslashes, etc. on the output filename but can't seem to come up with the right combination. Always seems to produce ERROR - 1242021 - (11) Syntax error near....
    Any ideas, suggestions or am I wasting my time on this one?
    Thanks,
    Tom
    System 9BI+ running on Windows
    /* ===========================================================================      */
    /* : Required Parameters      */
    /* : $1 - ID      */
    /* : $2 - password      */
    /* : $3 - app name      */
    /* : $4 - db name                                        */
    /* ===========================================================================      */
    login $1 $2 on 'localhost';
    execute calculation
    'SET DATAEXPORTOPTIONS
    DataExportLevel "LEVEL0";
    DataExportRelationalFile ON;
    DataExportOverwriteFile ON;
    DataExportDynamicCalc OFF;
    DataExportColFormat ON;
    FIX("CY2010");
    DATAEXPORT "File" "," E:\Hyperion\AnalyticServices\app\$3\$4\CY2010Data.txt "#MI";
    ENDFIX;'
    on $3.$4;
    spool off;
    logout;
    exit;

    Hi,
    I don't think the DATAEXPORT command likes parameters but there is a way around it, it does accept a substitution variable for the whole path and filename.
    If you create a sub var (in my example I have already created one called "ExpFile") then in your maxl script you can set the variable with the full path and filename and then call the subvar in the DATAEXPORT command
    You could do it with something like
    login $1 $2 on 'localhost';
    alter system set variable ExpFile "&#92;"E:&#92;&#92;Hyperion&#92;&#92;AnalyticServices&#92;&#92;app&#92;&#92;$3&#92;&#92;$4&#92;&#92;CY2010Data.txt&#92;"";
    execute calculation
    'SET DATAEXPORTOPTIONS
    DataExportLevel "LEVEL0";
    DataExportRelationalFile ON;
    DataExportOverwriteFile ON;
    DataExportDynamicCalc OFF;
    DataExportColFormat ON;
    FIX("CY2010")
    DATAEXPORT "File" "," &ExpFile "#MI";
    ENDFIX;' on $3.$4;
    logout;
    exit;
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to pass parameters to automation plugin to Javascript

    Hello,
    We can call automation plugin from java script below code.
    var xx = stringIDToTypeID( "459ac2e6-82d1-11d5-9879-00b0d0201111" );     // Has will be the unique ID for this plugin
    executeAction( xx, undefined, DialogModes.NO );
    I am trying to passing parameters for the same plugin.
    I tried to find a way myself following plug-in resource guide but there information is not so clear.
    Can you tell me,
    How to define parameters in terminology file. (my guess it should be define in terminology file)
    How to JS call with parameters
    And how to extract those parameters inside plugin.
    Sample Pipl.r file  (This is from C++ plugin in SDK)
    // Dictionary (scripting) resource
    resource 'aete' (16000, "Getter dictionary", purgeable)
           1, 0, english, roman, /* aete version and language specifiers */
                "Testing", /* vendor suite name */
                "Adobe example plug-ins", /* optional description */
                'get ', /* suite ID */
                1, /* suite code, must be 1 */
                1, /* suite level, must be 1 */
           { /* structure for automation */
           plugInName, /* name */
           "No comment", /* optional description */
           'get ', /* class ID, must be unique or Suite ID */
           'getr', /* event ID, must be unique */
           NO_REPLY, /* never a reply */
                IMAGE_DIRECT_PARAMETER, /* direct parameter, used by Photoshop */   <-- According to the documentation, I guess here should be come parameters.  (para name, keyID, typeID )
                { // filter or selection class here:
      {}, /* non-filter/automation plug-in class here */
      {}, /* comparison ops (not supported) */
      { // Enumerations go here:
      } /* end of any enumerations */
    // end GetterPiPL.r
    Thank you.

    Hello Mack,
    Thanks for your detail explanation.
    Actually, I haven't much play with PS javascripting plugins niter Fit image.
    The key points I have figure out that, the way you attached parameters to descriptor and point of finding some light from listener.
    That made me a conceptual idea, although I did not get all the mention facts.
    My previous guess was correct.
    Parameter should be something like below according to PiPL grammar. (in Sample Pipl.r file)
    'mymod', /* event ID, must be unique */
           NO_REPLY, /* never a reply */
                IMAGE_DIRECT_PARAMETER, /* direct parameter, used by Photoshop */ 
                "action",    /* name for parameter*/
                 keyMyPara,    /*Key parameter you have define in terminology file*/
                 typeChar,       /*parameter type*/
                 "",     /*optional description*/
                 flagsSingleParameter     /*flags */
    The UUID is enough for calling plugin, only challenge was to define parameter wtr grammar at PiPL and read it at C++ end.
    Another important fact is that we have the message pointer which points to above plug-in parameters.
    Automation plugin would give that access.

  • CF/Ajax - How to pass parameters to a cfwindow?

    Hi,
    Is there a way to pass parameters to a cfwindow?
    If yes, please provide me with all relevant details.
    HERE IS MY SITUATION:
    I have a form, in which I'm looping over a recordset e.g.
    <cfform name="frmTest">
         <cfset counter = 0>
         <cfloop query="variables.qTest">
              <cfset counter = variables.counter + 1>
              <cfinput
                   type="checkbox"
                   name="test_#variables.counter#_ch"
                   onClick="showPopUp(#variables.qTest.id#,#variables.qTest.amount#)">
         </cfloop>
    </cfform>
    Here is my javascript / ajax:
    <script type="text/javascript">
    <!--
    function showPopUp(id,amt){
    ColdFusion.Window.show("approvalWindow");
    //-->
    </script>
    And here is my cfwindow:
    <cfwindow
                name="approvalWindow" center="true" closable="true"
                draggable="false" modal="true" title="Approval"
                initshow="false" width="680" height="315">
    HOW CAN I OBTAIN THE VALUES OF id AND amt HERE?
    E.g.
    <cfset idClicked = id>
    <cfset amtClicked = amt>
    I'll be needing those 2 variables for further processing...
    </cfwindow>
    I know I could have used a simple javascript window.open and passed those 2 parameters in the URL scope, but, I don't want my users to see what id I'm sending.
    Thanks and regards,
    Yogesh Mahadnac.

    Hi,
    Many thanks for your answer.
    It actually works under "static" conditions, i.e. if I'm calling the cfwindow inside a cfloop, the value of ID is not refreshed.
    Let me show you what I mean.
    For example, here is my form
    <cfform name="frmTest">
         <cfset counter = 0>
         <cfloop query="variables.qTest">
              <cfset counter = variables.counter + 1>
              <cfinput
                   type="checkbox"
                   name="test_#variables.counter#_ch"
                   onClick="showPopUp(#variables.qTest.id#,#variables.qTest.amount#)">
         </cfloop>
    </cfform>
    This gives the output, e.g.
    Checkbox 1
    Checkbox 2
    Checkbox 3
    Checkbox 4
    Checkbox 5
    ID 1
    ID 2
    ID 3
    ID 4
    ID 5
    showPopUp(1,10)
    showPopUp(2,15)
    showPopUp(3,12)
    showPopUp(4,15)
    showPopUp(5,50)
    Now, here is the showPopUp part (using the solution you provided to me):
    <cfajaximport tags="cfwindow">
    <script type="text/javascript">
    <!--
        function showPopUp(id,amt){
            ColdFusion.Window.create('Window1','Window Title','test.cfm?ID='+ id + '&amt=' + amt,
            {_cf_refreshOnShow:true,height:290,width:630,modal:true,closable:true,draggable:true,resi zable:false,center:true,initshow:true});
    //-->
    </script>
    And then on test.cfm, we can easily obtain the value of ID and amt using the url scope
    <cfset id = url.ID>
    <cfset amt = url.amt>
    <cfdump var="#url#" label="Checking values sent from checkbox">
    Normally, the value of ID should be 1, 2, 3, 4 or 5 depending on the checkbox you click, right?
    When you click the 1st one, ID 1 is sent in the url (this is fine).
    However, if you click the 3rd checkbox after having clicked the 1st one, the value of ID and amt still reflect that of the 1st checkbox.
    It is not "refreshed" to 3 and 12, you still get ID = 1 and amt = 10.
    Is there anything we missed in the showPopUp script?
    Thanks and regards,
    Yogesh Mahadnac.

  • Login Form - pass parameters to remote site

    Hi,
    I need to create a login form on site A which passes parameters (username;company; password) to site B. The user will then be logged into site B in a new window.
    I guess this can be done in php on site A but my php skills are sketchy to say the least.
    What I understand I need to do is send a GET request to http://site_b/login.asp?username=XXXX&company=XXXX&password=XXXX where the XXXX values come from the form on site A.
    This is what I have (which is probably way out)...
    <form method="get" action="http://site_b/login.asp?username=$username&company=$company&password=$password">
            Username: <input type="text" name="username"  <?php {echo "value=''username";}?>   /><br />
            Company: <input type="text" name="company" <?php {echo "value='$company'";}?>/><br />
            Password: <input type="password" name="password" <?php {echo "value='$password'";}?>/><br />
        <input type="submit" value="Login" /><br />
        </form>
    ....of course it doesn't work.
    I would be grateful if someone could point me in the right direction, thanks.
    Mick

    Mick3496 wrote:
    bregent - they were very clear about the form fields:
    username   (alpha/numeric)
    company   (numeric only)
    password  (alpha/numeric)
    Note that the fields are all lower case.
    Are you saying the form code I posted should work?
    Mick
    It looks fine to me. For testing purposes you might want to change the password field to a text field so that you can be sure it is being populated correctly. And again, make sure that they are not checking referrers in their ASP script.

Maybe you are looking for