Form processing using getParameter Names() and Values() Seriously confused

Hi all,
I have an HTML table containing multiple <INPUT name='Flows[]' ...> to create arrays. However, when I try to process the code in my servlet it gets ignored and no excpetions are thrown. I know I must be doing something wrong but for the life of me I cannot see what or where it is.
Enumeration <String> paramNames = request.getParameterNames() ;
double dFlows[] = null ;
while (paramNames.hasMoreElements())
     try
          String pName = paramNames.nextElement() ;
          System.out.println(String.format("Parameter Name : %s Length %d", pName, pName.length())) ;
          if (pName == "Flows[]")
               String pValues[] = request.getParameterValues(pName) ;
               nParams = pValues.length ;
               System.out.println(String.format("Found %s Flow Readings", nParams)) ;
               dFlows = new double[nParams] ;
               for (p = 0; p < nParams; p++)
                    dFlows[p] = Double.parseDouble(pValues[p]) ;
          else
               System.out.println(String.format("%s != Flows[]", pName)) ;
     catch (Exception e)
          e.printStackTrace(System.out) ;
}The output I get in the log file is :
Parameter Name : Flows[] : Length 7
Flows[] != Flows[]
If the log is to believed then the error is in the if (pName == "Flows[]") but the log proves this to be wrong!
Can anyone help me out with this, I really am seriously confused.
Bill Moo

          if (pName == "Flows[]")
          if (pName.equals("Flows[]"))But why on earth are you looping through all the parameters when you already know the name? Use request.getParameter("Flows[]");

Similar Messages

  • Dynamic form... field names and values...

    Boy-Howdy. I wish I had the opportunity to stop by this forum and hang out at a time when I am not having issue, but, alas... I appreciate the brain power of the great minds that populate this forum.
    I have an issue: I think I am close on this but cannot identify where my syntax is going awry. Here is a simplified edition of my situation.
    I have a form with a set of dropdown menus that filter a recordset. The group of drop downs are dynamic from a database and will vary depending on what category of products a visitor is viewing.
    If I browse to FRUIT: I get three options that let me filter for:
    Fruit Type
    - Apples
    - Bananas
    - Pears
    Fruit Grown By:
    - Organic
    - Any
    Fruit From:
    - Domestic
    - South America
    - European
    However, if I browse to LUMBER I get:
    Wood Type:
    - Pine
    - Walnut
    - Oak
    Wood Prep:
    - Pre Cut
    - RAW Timber
    Wood Origin:
    - North America
    - South America
    - Europe
    I have the variable naming and database values worked out. My only issue is when I browse to friuit and select apples I want apples to remain selected as I page through results.
    So, the dropdown field names are dynamic. Currently set to zgen1, zgen2, zgen3. I set a variable named sr and increment it to build the progressive 1,2,3 after the field name zgen.
    <cfparam name="sr" default="1">
    <cfoutput group="ft_id" query="oompa2">
    <strong>#f_ftrname#:</strong><br>
    <select name="zgen#variables.sr#">
    <OPTION value="">select...</OPTION>
    <cfoutput>
    <OPTION value="#ft_id#_#fs_id#">#ft_options#</OPTION>
    </cfoutput>
    </select>
    <br><br>
    <cfset sr=#sr# + 1>
    </cfoutput>
    But when zgen1 has a value (in this case "Apples") I can't figure out how to dynamically test for the presence of a value for each dropdown. I have dynamically created the field names (cfset xvalue="FORM.zgen#variables.sr#") to test against. However this creates a value of FORM.zgen1, FORM.zgen2, FORM.zgen3 as it loops when I want it to be Apples, Organic, Domestic.
    Example:
    The code:
    <OPTION value="#ft_id#_#fs_id#"<cfif xvalue IS "#ft_id#_#fs_id#"> SELECTED</cfif>>#ft_options#</OPTION>
    which is translating to:
    <OPTION value="15_5"<cfif FORM.zgen1 IS "15_5"> SELECTED</cfif>>Apples</OPTION>
    When I want it to be:
    <OPTION value="15_5"<cfif 15_5 IS "15_5"> SELECTED</cfif>>Apples</OPTION>
    I hope I am making sense. I would greatly appreciate it if someone could help me noodle this. I have a feeling it is not as complicated as my mind is trying to make it. Thoughts?

    Three selects related type code was not the way to go - because I need each filter to be independent. I created a custom tag that argues the state for each separately up to ten filters.

  • How to kill Forms Runaway Process using 95% CPU and running for 2 hours.

    We had a situation at E-Business Suite customer (using Oracle VM server) where some of Form processes were not being cleared by form timeout settings automatically.
    Also when user exits the form session from front end, the linux form process (PID) and DB session did not exit properly, so they got hung.
    They were spiking CPU and memory usage and causing e-business suite to perform slowely and ultimately causing VM host to reboot the production VM guest (running on Linux).
    We could see the form processes (PIDs) using almost 100% cpu with "top" command and running for a long time.
    Also we verified those Form Sessions did not exist in the application itself.
    ie. Using from Grid Control -> OAM-> Site Map -> Monitoring (tab) -> "Form Sessions".
    It means that we could safely kill that form process from Linux using "kill -9 <PID>" command.
    But that required a continuous monitoring and manual DBA intervention as customer is 24x7 customer.
    So, I wrote a shell script to do the following;
    •     Cron job runs every half an hour 7 days a week which calls this shell script.
    •     Shell script runs and tries to find "top two" f60webmx processes (form sessions) using over 95% cpu with 2 minutes interval.
    •     If no process is found or CPU% is less than 95%, it exits and does nothing.
    •     If top process is found, it searches for its DB session using apps login (with hidden apps password file - /home/applmgr/.pwd).
    a.     If DB session is NOT found (which means form process is hung), it kills the process from unix and emails results to <[email protected]>
    b.     If DB session is found, it waits for 2 hours so that form process times automatically via form session timeout setting.
    It also emails the SQL to check the DB session for that form process.
    c.     If DB session is found and it does not timeout after 2 hours,
    it kills the process from unix (which in turn kills the DB session). Output is emailed.
    This are the files required for this;
    1. Cron job which calls the shell script looks like this;
    # Kill form runaway process, using over 95% cpu having no DB session or DB session for > 2hrs
    00,30 * * * * /home/applmgr/forms_runaway.sh 2>&1
    2. SQL that this script calls is /home/applmgr/frm_runaway.sql and looks like;
    set head off
    set verify off
    set feedback off
    set pagesize 0
    define form_client_PID = &1
    select count(*) from v$session s , v$process p, FND_FORM_SESSIONS_V f where S.AUDSID=f.audsid and p.addr=s.paddr and s.process='&form_client_PID';
    3. Actual shell script is /home/applmgr/forms_runaway.sh and looks like;
    # Author : Amandeep Singh
    # Description : Kills runaway form processes using more than 95% cpu
    # and Form Session with no DB session or DB session > 2hrs
    # Dated : 11-April-2012
    #!/bin/bash
    . /home/applmgr/.bash_profile
    PWD=`cat ~/.pwd`
    export PWD
    echo "`date`">/tmp/runaway_forms.log
    echo "----------------------------------">>/tmp/runaway_forms.log
    VAR1=`top -b -u applmgr -n 1|grep f60webmx|grep -v sh|grep -v awk|grep -v top|sort -nrk9|head -2|sed 's/^[ \t]*//;s/[ \t]*$//'| awk '{ if ($9 > 95 && $12 = "f60webmx") print $1 " "$9 " "$11 " "$12; }'`
    PID1=`echo $VAR1|awk '{print $1}'`
    CPU1=`echo $VAR1|awk '{print $2}'`
    TIME1=`echo $VAR1|awk '{print $3}'`
    PROG1=`echo $VAR1|awk '{print $4}'`
    PID_1=`echo $VAR1|awk '{print $5}'`
    CPU_1=`echo $VAR1|awk '{print $6}'`
    TIME_1=`echo $VAR1|awk '{print $7}'`
    PROG_1=`echo $VAR1|awk '{print $8}'`
    echo "PID1="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    echo "PID_1="$PID_1", CPU%="$CPU_1", Running Time="$TIME_1", Program="$PROG_1>>/tmp/runaway_forms.log
    echo " ">>/tmp/runaway_forms.log
    sleep 120
    echo "`date`">>/tmp/runaway_forms.log
    echo "----------------------------------">>/tmp/runaway_forms.log
    VAR2=`top -b -u applmgr -n 1|grep f60webmx|grep -v sh|grep -v awk|grep -v top|sort -nrk9|head -2|sed 's/^[ \t]*//;s/[ \t]*$//'| awk '{ if ($9 > 95 && $12 = "f60webmx") print $1 " "$9 " "$11 " "$12; }'`
    PID2=`echo $VAR2|awk '{print $1}'`
    CPU2=`echo $VAR2|awk '{print $2}'`
    TIME2=`echo $VAR2|awk '{print $3}'`
    PROG2=`echo $VAR2|awk '{print $4}'`
    PID_2=`echo $VAR2|awk '{print $5}'`
    CPU_2=`echo $VAR2|awk '{print $6}'`
    TIME_2=`echo $VAR2|awk '{print $7}'`
    PROG_2=`echo $VAR2|awk '{print $8}'`
    HRS=`echo $TIME1|cut -d: -f1`
    exprHRS=`expr "$HRS"`
    echo "PID2="$PID2", CPU%="$CPU2", Running Time="$TIME2", Program="$PROG2>>/tmp/runaway_forms.log
    echo "PID_2="$PID_2", CPU%="$CPU_2", Running Time="$TIME_2", Program="$PROG_2>>/tmp/runaway_forms.log
    echo " ">>/tmp/runaway_forms.log
    # If PID1 or PID2 is NULL
    if [ -z ${PID1} ] || [ -z ${PID2} ]
    then
    echo "no top processes found. Either PID is NULL OR CPU% is less than 95%. Exiting...">>/tmp/runaway_forms.log
    elif
    # If PID1 is equal to PID2 or PID1=PID_2 or PID_1=PID2 or PID_1=PID_2
    [ ${PID1} -eq ${PID2} ] || [ ${PID1} -eq ${PID_2} ] || [ ${PID_1} -eq ${PID2} ] || [ ${PID_1} -eq ${PID_2} ];
    then
    DB_SESSION=`$ORACLE_HOME/bin/sqlplus -S apps/$PWD @/home/applmgr/frm_runaway.sql $PID1 << EOF
    EOF`
    echo " ">>/tmp/runaway_forms.log
    echo "DB_SESSION ="$DB_SESSION >>/tmp/runaway_forms.log
    # if no DB session found for PID
    if [ $DB_SESSION -eq 0 ] then
    echo " ">>/tmp/runaway_forms.log
    echo "Killed Following Runaway Forms Process:">>/tmp/runaway_forms.log
    echo "-------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "PID="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    kill -9 $PID1
    #Email the output
    mailx -s "Killed: `hostname -a` Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    else
    # If DB session exists for PID
    if [ ${exprHRS} -gt 120 ]; then
    echo $DB_SESSION "of Database sessions exist for this forms process-PID="$PID1". But its running for more than 2 hours. ">>/tmp/runaway_forms.log
    echo "Process running time is "$exprHRS" minutes.">>/tmp/runaway_forms.log
    echo "Killed Following Runaway Forms Process:">>/tmp/runaway_forms.log
    echo "-------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "PID="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    kill -9 $PID1
    #Email the output
    mailx -s "`hostname -a`: Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    else
    echo "Process running time is "$exprHRS" minutes.">>/tmp/runaway_forms.log
    echo $DB_SESSION "of Database sessions exist for PID="$PID1" and is less than 2 hours old. Not killing...">>/tmp/runaway_forms.log
    echo "For more details on this PID, run following SQL query;">>/tmp/runaway_forms.log
    echo "-----------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "set pages 9999 lines 150">>/tmp/runaway_forms.log
    echo "select f.user_form_name, f.user_name, p.spid DB_OS_ID , s.process client_os_id,, s.audsid, f.PROCESS_SPID Forms_SPID,">>/tmp/runaway_forms.log
    echo "to_char(s.logon_time,'DD-Mon-YY hh:mi:ss'), s.seconds_in_wait">>/tmp/runaway_forms.log
    echo "from v\$session s , v\$process p, FND_FORM_SESSIONS_V f">>/tmp/runaway_forms.log
    echo "where S.AUDSID=f.audsid and p.addr=s.paddr and s.process='"$PID1"' order by p.spid;">>/tmp/runaway_forms.log
    mailx -s "`hostname -a`: Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    fi
    fi
    else
    #if PID1 and PID2 are not equal or CPU% is less than 95%.
    echo "No unique CPU hogging form processes found. Exiting...">>/tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    fi
    If you have the same problem with some other unix and DB processes, the script can be easily modified and used.
    But use this with thorough testing first (by commenting out <kill -9 $PID1> lines.
    Good luck.
    Edited by: R12_AppsDBA on 19/04/2012 13:10

    Thanks for sharing the script!
    Hussein

  • Additional Results Custom Step using Variables in Name and Value to Log expressions?

    I am trying to create a Custom Step Type for logging additional results - requiring a single Name and Value data pair included in the step.
    I want to pass the name and value data in using two specific variables.
    This functionality can of course be explicitly coded on a test step without problem, but I can't find a way to create a custom test step which inserts such a step i.e. automatically inserting the correct variable names into Name and Value to Log fields.
    Any ideas how to accomplish this? I don't want the custom step users to have to type in the variable names every time they use it.
    I am using TestStand 4.1.1
    Message Edited by CIM1 on 04-20-2009 07:26 AM

    Hi CIM1,
    There are a few ways of doing this.
    The simplest one would be to configure the expression in the Pre-Expression or Post-Expression (depending on whether you would like the Step Type to use the value in the variables or write the value to the variables) and then from here you can lock away the expressions from being edited. The caveat with this method is that you are obviously restricing the Pre/Post-Expressions for the step type. 
    Another Method would be to code some code modules to Write to/Read from the Variables and then calling these in the Steps Pre-Step SubStep or Post-Step Substep. The advantages of this method would be that you can search for the Variable, and if the variable is not present, you could create it before writing to it.
    Hope this Helps.
    Best Regards,
    Steve H 

  • How to get Cookie Name and Value Using HttpGetterCallback - CE 7.3

    Hi All,
    We are migrating from Netweaver 7.0 to 7.3. We are facing a issue when migrating the custom login module from 7.0 to 7.3.
    Since WebCallback is deprecated and not to be used in Netweaver 7.3, we are finding difficulties in getting the cookie name and value. Please find below our coding for getting the cookie value using HttpGetterCallback. We are not getting the cookie name and value, Kindly let us know if we are implementing the HttpGetterCallback correctly.
    HttpGetterCallback httpGetCookieCallback = new HttpGetterCallback();
    httpGetCookieCallback.setType(HttpCallback.COOKIE);
    Callback] callbks = new Callback[ { httpGetUrlCallback, httpGetCookieCallback };
    callbackHandler.handle(callbks);
    requestUrl = (String) httpGetUrlCallback.getValue();
    Cookie] cookies = (Cookie [) httpGetCookieCallback.getValue();
    if (cookies != null) {
    for (int i = 0; i < cookies.length; i++) {
    location.debugT("Cookies name " + cookies.getName()
    + " - value "
    + cookies.getValue());
    Thanks and Regards,
    Saravanan

    Try This-
            Cookie cookiesArray[] = request.getCookies();
         Cookie currentCookie = null;
         String currentCookieName = "";
         String cookieValue = "dummycookie";
         int cookieArrayLength = cookiesArray.length;
         for (int i = 0; i < cookieArrayLength; i++) {
              currentCookie = cookiesArray<i>;
              currentCookieName = currentCookie.getName();
              cookieValue = currentCookie.getValue();
    Regards,
    Atul

  • What is the key column name and value column name in JDBC Adapter parameter

    Hi
    Can any one please tell me what is the Key Column Name and Key Column Value in JDBC adatper parameters. If i dont mention those parameters i am getting the following error
    <b> Value missing for mandatory configuration attribute tableEOColumnNameId</b>
    Please help me
    Best Regards
    Ravi Shankar B

    Hi
    I am doing DataBase Lookup in XI
    First i have created a  Table in Database( CheckUser) which has two fields UserName and PhoneNumber and then i have created
    I have created one Communication Channel For Reciever Adapter .
    I have given the parameters like this
    JDBC Driver : com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection : jdbc:microsoft:sqlserver://10.7.1.43:1433;DatabaseName=Ravi;
    UserName.... sa
    password.... sa
    persistence : Database
    Database Table Name : CheckUser
    Key column name and Value column name i left blank and activated
    and then
    I have created
    Data Types : Source ...... UserName
                      Destination.... PhoneNumber
    Message Types
    Message Interfaces
    In Message Mapping
                  I have created one User Defined function DBProcessing_SpecialAPI().This method will get the data from the database....
    In this function i have written the following code
       //write your code here
    String query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet = null;
    query = "select Password from CheckUser where UserName = ' " +UserName[0]+ " '  ";
    try {
         channel = LookupService.getChannel("Ravi","CC_JDBC");
         accessor = LookupService.getDataBaseAccessor(channel);
         resultSet = accessor.execute(query);
         for(Iterator rows = resultSet.getRows();rows.hasNext();){
              Map  rowMap = (Map)rows.next();
              result.addValue((String)rowMap.get("Password"));
    catch(Exception e){
         result.addValue(e.getMessage());
    finally{
         try{
              if(accessor != null)
                   accessor.close();
         }catch(Exception e){
              result.addValue(e.getMessage());
    And the i have mapped like this
    UserName -
    > DBProcessing_SpecialAPI----
    >PhoneNumber
    when i am testing this mapping i am getting the following error
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Dest_JDBC_MT xmlns:ns0="http://filetofilescenario.com/ilg"><phoneNumber>Plain exception:Problem when calling an adapter by using communication channel CC_JDBC (Party: , Service: Ravi, Object ID: c360bc139a403293afbc49d5c46e4478) Check whether the communication channel exists in the Integration Directory; also check the cache notifications for the instance Integration Server (central Adapter-Engine) Channel object with Id Channel:c360bc139a403293afbc49d5c46e4478 not available in CPA Cache.
    com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel CC_JDBC (Party: , Service: Ravi, Object ID: c360bc139a403293afbc49d5c46e4478) Check whether the communication channel exists in the Integration Directory; also check the cache notifications for the instance Integration Server (central Adapter-Engine) Channel object with Id Channel:c360bc139a403293afbc49d5c46e4478 not available in CPA Cache.
         at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.<init>(AdapterProxyLocal.java:61)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.getProxy(SystemAccessorInternal.java:98)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.<init>(SystemAccessorInternal.java:38)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.getConnection(SystemAccessorHmiServer.java:270)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:70)
         at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
         at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
         at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    </phoneNumber></ns0:Dest_JDBC_MT>
    In RWB i have checked the status of JDBC driver its showing the following error
    <b>Value missing for mandatory configuration attribute tableEOColumnNameId</b>
    Best Regards
    Ravi Shankar B
    Message was edited by:
            RaviShankar B

  • How do i fix the "web form must capture customer name and email address" error?

    Hi all,
    I have a webform that is submitting securely to the bc servers. I get the response:
    {"SystemMessage": { "success": False, "message": "ERROR: An error occurred. Your web form must capture customer name and email address. Please fix this issue and re-insert your web form on your web page." }}
    I have verified that the "FirstName","LastName","EmailAddress" are actually gettting sent with their corresponding values. I can't seem to figure out why i keep getting this error. Can someone please lend a helping hand?!? Thanks guys... here's my code:
    var rAction = 'https://site.worldsecuresystems.com/FormProcessv2.aspx?WebFormID=85886&OID={module_oid}&OTYPE={module_otype}&EID={module_eid}&CID={module_cid}&CC={module_urlcountryc ode}&Referrer={module_siteurl,true,true}&JSON=1';
    var rData = 'FirstName='+escape(fName.val())+'&LastName='+escape(lName.val())+'&EmailAddress='+escape (email.val())+'&Username='+escape(username.val())+'&Password='+escape(passwd.val())+'&Pass wordConfirm='+escape(passwd2.val())+'&BillingAddress='+escape(baddress.val())+'&BillingCit y='+escape(bcity.val())+'&BillingState='+escape(bstate.val())+'&BillingZip='+escape(bzip.v al())+'&PaymentMethodType='+escape(paymentMethodType)+'&CardName='+escape(cName.val())+'&C ardNumber='+escape(cNum.val())+'&CardExpiryMonth='+escape(expMonth)+'&CardExpiryYear='+esc ape(expYear)+'&CardType='+escape(cType)+'&CardCCV='+escape(ccv.val())
    $.ajax({
    type: 'POST',
    url: rAction,
    data: rData,
    success: function(msg){
    console.log('success');
    $('#result').html(msg);
    error: function(msg){
    console.log('error');
    $('#result').html(msg);

    Ok -- after testing this out a little on my own I think it must have to do with not properly serialzing the data you are passing in the ajax function.  In the example I linked to earlier they are just serialzing the form data and it works because it converts the data in the form's input fields to URL encoded notation.
    If you aren't using an actual form on your site to mimick the example I linked to then when building your "rData" string instead of using the "escape" function for each of the parameter values, you should be using the "encodeURIComponent" function instead which instead of escaping characters will convert it to URL encoded notation.  That's probably your issue. Here's more about encodeURIComponent(): http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp
    Try this with the rData variable instead:
    var rData = 'FirstName='+encodeURIComponent(fName.val())+'&LastName='+encodeURIComponent(lName.val()) +'&EmailAddress='+encodeURIComponent(email.val())+'&Username='+encodeURIComponent(username .val())+'&Password='+encodeURIComponent(passwd.val())+'&PasswordConfirm='+encodeURICompone nt(passwd2.val())+'&BillingAddress='+encodeURIComponent(baddress.val())+'&BillingCity='+en codeURIComponent(bcity.val())+'&BillingState='+encodeURIComponent(bstate.val())+'&BillingZ ip='+encodeURIComponent(bzip.val())+'&PaymentMethodType='+encodeURIComponent(paymentMethod Type)+'&CardName='+encodeURIComponent(cName.val())+'&CardNumber='+encodeURIComponent(cNum. val())+'&CardExpiryMonth='+encodeURIComponent(expMonth)+'&CardExpiryYear='+encodeURICompon ent(expYear)+'&CardType='+encodeURIComponent(cType)+'&CardCCV='+encodeURIComponent(ccv.val ())

  • How to get the name and value of an attribute on a node/element that is not a child

    Hello,
    Can someone shed some wisdom on how I can compare 2 xml nodes for differences.
    My main challenge is I need to use the attributes/values of 'ProductDescription' and 'Features' as 'key' to identify the same node in
    another doc with the same layout, but different content.
    I am having trouble getting the name of the attribute on the node, 'ProductDescription' and 'Features'.  I can only seem to get the node names, but not the attributes on the node.  I need the name, because it can be different from doc to doc, so
    I can't hardcode this.
    Can someone please help with how to retrieve an attribute name/value on a node that is not a child.  Here's an example of what
    my xml looks like:
    DECLARE
    @myDoc1 xml
    ,@mydoc2 xml
    DECLARE
    @ProdID int
    SET @myDoc1 ='<ProductDescription ProductID="1" ProductName="Road Bike">
    <Features  featureID  = "1" featureName = "body">
      <Warranty>1 year parts and labor</Warranty>
      <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    <features featureID = "2" featureName = "seat">
      <Warranty>1 year parts and labor</Warranty>
      <Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    </ProductDescription>
    SET @myDoc2 ='<ProductDescription ProductID="1" ProductName="Road Bike">
    <Features  featureID  = "1" featureName = "body">
      <Warranty>2 year parts and labor</Warranty>
      <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    <features featureID = "2" featureName = "wheel">
      <Warranty>1 year parts and labor</Warranty>
      <Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    </ProductDescription>
    I need to compare the attributes of 'ProductDescription' and 'Features' from @mydoc1 against @mydoc2 to see if they are the same based on those 2 nodes first.  If they are, then i want to show the difference in the child elements. 
    This will eventually be an outer join to give me the differences betw the 2 docs based on those key values (node attributes).
    I used node('//*') for the path, and value('local-name(../.)', 'varchar(50)') as element
    ,value('.[not(@xsi:nil = "true")]','VARCHAR(255)') AS new_value
    ...etc...
    but that only gives me the node names, and the child elements.  It does not give me back the attribute names and values from the node itself.
    Thanks in advance for your help.
    cee

    Are you looking for something like this:
    DECLARE @myDoc1 xml
    SET @myDoc1 ='<ProductDescription ProductID="1" ProductName="Road Bike">
    <Features  featureID  = "1" featureName = "body">
      <Warranty>1 year parts and labor</Warranty>
      <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    <Features featureID = "2" featureName = "seat">
      <Warranty>1 year parts and labor</Warranty>
      <Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    </ProductDescription>'
    SELECT T.c.value('local-name(.)', 'nvarchar(50)') AS name,
           T.c.value('.', 'nvarchar(50)')  AS value
    FROM   @myDoc1.nodes('ProductDescription/@*') AS T(c)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Send name and value of control to subvi

    Hi all
    I am trying to send the names and values of controls to a subvi. 
    I know that I can extract the name and value of the control using a property node, but I was looking for a way to make is easy to use for the programmer.
    I am thinking of some kind of bundle function, it saves the name and value of the control, but I would like the programmer to be able to connect a random number
    of controls to this subvi without having to specify the number of controls anywer.
    I know there is configuration file stuff in labview, but it looks a bit more complex then what I want to do.
    Also i know that I can use the OpenG toolkit, but I'll rather not use any add-ons to labview, as this VI might be running on many different computers.
    Hope I made my problem clear enough! 
    Have a nice day
    Regards
    Tommy
    Running LabVIEW 2009 32bit SP1 on Windows 7 64Bit
    Solved!
    Go to Solution.

    tombech wrote:
    Hi all
    I am trying to send the names and values of controls to a subvi. 
    I know that I can extract the name and value of the control using a property node, but I was looking for a way to make is easy to use for the programmer.
    I am thinking of some kind of bundle function, it saves the name and value of the control, but I would like the programmer to be able to connect a random number
    of controls to this subvi without having to specify the number of controls anywer.
    I know there is configuration file stuff in labview, but it looks a bit more complex then what I want to do.
    Also i know that I can use the OpenG toolkit, but I'll rather not use any add-ons to labview, as this VI might be running on many different computers.
    Hope I made my problem clear enough! 
    Have a nice day
    Regards
    Tommy
    I am not sure what you have in mind Tommy but lets rule out the rediculous.
    You can find a Nugget I wrote here that explains how I managed to write an Save/Restore function that will automatically adapt to a type-def'd cluster. THat Nugget include my original source code as well as a full description of what where why and how.
    I have used that code in multiple applications and it has demonstrated that it works.
    No not all data types are supported! I left that as an exercise for the reader.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Help in retrieving the element attribute name and value..

    Hi have to retrieve the attribute name and value from the element.....
    requirement is like this
    <ws:GetRightNowProductViewByDivisionResponse xmlns:ws="http://ws.sage.co.uk/">
    <ws:GetRightNowProductViewByDivisionResult ProductID=" " RightNowProductView=""/>
    </ws:GetRightNowProductViewByDivisionResponse>
    i should get all the element attbutes names as attributes in above mentioned format ..using xquery...
    here is the respone ....
    <sage:sageRequestResponse xmlns:sage="http://www.sage.com">
    <env:EaiEnvelope xmlns:env="http://www.sage.com/Envelope">
    <env:Domain>string</env:Domain>
    <env:Service>RightNowBroker</env:Service>
    <env:UserId>string</env:UserId>
    <env:OperationName>GetRightNowProductViewByDivision</env:OperationName>
    <env:Payload>
    <ws:GetRightNowProductViewByDivisionResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.sage.co.uk/">
    <xs:schema id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="RightNowProductView" msdata:UseCurrentLocale="true">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="RightNowProductView">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ProductId" type="xs:short"/>
    <xs:element name="Product" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
    <xs:selector xpath=".//RightNowProductView"/>
    <xs:field xpath="ProductId"/>
    </xs:unique>
    </xs:element>
    </xs:schema>
    <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"/>
    </ws:GetRightNowProductViewByDivisionResult>
    </env:Payload>
    </env:EaiEnvelope>
    </sage:sageRequestResponse>

    Hi
    Just as an aside to the comments above, a scenario we see occasionally is where a desk provides an internal function (e.g. a helpdesk) and you really just want to get the name display (as seen on the handsets) onto the CAD display.
    You can do this by  doing a reverse lookup over HTTP against CUCM. There are a number of posts around, these should get you started :
    https://supportforums.cisco.com/thread/2065114
    https://supportforums.cisco.com/message/3024617
    A couple of notes:
    - It looks up against the directory, NOT the actual calling line. So you can add stuff to the directory to get external callers to show up by name, but should expect the unexpected when you have shared lines (e.g. multipel directory entries with one tel number for whatever reason)
    - If you want to do different lookups (i.e. get names back in a different format, get the actual line display name from CUCM, or lookup elsewhere) then you would need to either:
    1) Do it via SOAP or another technology from the UCCX script engine
    2) Put in a small external web service to do the lookups and allow UCCX to query via simple HTTP
    3) Use a DB for the numbers so you can read/write to it from UCCX and regularly update the data from wherever you like
    Regards
    Aaron HarrisonPrincipal Engineer at Logicalis UK
    Please rate helpful posts...

  • JAXB 2.0 with JXDM gives error.  Use @XmlType.name and @XmlType.namespace

    Hi,
    I am getting the below error for JXDM when using. It was mentioned in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302524 that it is fixed. Still getting this error.
    a) Appreciate if anyone can tell how to use the bug fix b20 that is mentioned in the above? I downloaded the latest jaxb 2.0 from this site and also from the jaxb RI(Reference Implementation and tried both).
    b) Is there any workaround to get through this?
    Will appreciate if any one can give advise on this.
    ************** Here is the error message ******************
    There was this problem creating a context com.sun.xml.bind.v2.runtime.IllegalAnn
    otationsException: 1 counts of IllegalAnnotationExceptions
    Two classes have the same XML type name "usStateCodeType". Use @XmlType.name and
    @XmlType.namespace to assign different names to them.
    this problem is related to the following location:
    at gov.ojp.it.jxdm.usps_states._1.USStateCodeType
    at protected gov.ojp.it.jxdm.usps_states._1.USStateCodeType gov.
    ojp.it.jxdm._3_0_2.proxy.usps_states._1.USStateCodeType.value
    at gov.ojp.it.jxdm._3_0_2.proxy.usps_states._1.USStateCodeType
    at protected gov.ojp.it.jxdm._3_0_2.proxy.usps_states._1.USState
    CodeType generated.CjsAddressType.locationStateCodeUSPostalService
    at generated.CjsAddressType
    at protected java.util.List generated.CjsPersonType.personAddres
    s
    at generated.CjsPersonType
    at protected generated.CjsPersonType generated.CjsSuspectType.su
    spectPerson
    at generated.CjsSuspectType
    at protected generated.CjsSuspectType generated.CjsReportType.su
    spect
    at generated.CjsReportType
    at public generated.CjsReportType generated.ObjectFactory.create
    CjsReportType()
    at generated.ObjectFactory
    this problem is related to the following location:
    at gov.ojp.it.jxdm.fips_5_2._1.USStateCodeType
    at protected gov.ojp.it.jxdm.fips_5_2._1.USStateCodeType gov.ojp
    .it.jxdm._3_0_2.proxy.fips_5_2._1.USStateCodeType.value
    at gov.ojp.it.jxdm._3_0_2.proxy.fips_5_2._1.USStateCodeType
    at protected java.util.List gov.ojp.it.jxdm._3_0.AddressType.loc
    ationStateCodeFips52Alpha
    at gov.ojp.it.jxdm._3_0.AddressType
    at protected java.util.List gov.ojp.it.jxdm._3_0.LocationType.lo
    cationAddress
    at gov.ojp.it.jxdm._3_0.LocationType
    at protected java.util.List gov.ojp.it.jxdm._3_0.OrganizationTyp
    e.organizationLocation
    at gov.ojp.it.jxdm._3_0.OrganizationType
    at protected java.util.List gov.ojp.it.jxdm._3_0.BookingType.boo
    kingAgency
    at gov.ojp.it.jxdm._3_0.BookingType
    at generated.CjsBookingType
    at public generated.CjsBookingType generated.ObjectFactory.creat
    eCjsBookingType()
    at generated.ObjectFactory
    Check this out
    Exception in thread "main" java.lang.NullPointerException
    at bpd.MakeNewItem.marshallItem(MakeNewItem.java:119)
    at bpd.MakeNewItem.persistItem(MakeNewItem.java:112)
    at bpd.MakeNewItem.<init>(MakeNewItem.java:31)
    at bpd.MakeNewItem.main(MakeNewItem.java:137)
    ********************End of error message ******************
    Thanks
    Sat
    Message was edited by:
    sat_p

    In Help > About > Properties:
    sqldeveloper.oci.available = true

  • Local name and value to test report?

    Hello!
    I have a local variable in MainSequence which name and value I want to include to test report. How can this be done?
    BR,
    Jick
    Solved!
    Go to Solution.

    You could also use the Additional Results step or Additional Results for any step.
    See Attachment
    Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    AdditionalResult.png ‏12 KB

  • HCM & forms Process using WD4A

    Hello All,
    We are planning to implement applications of HCM & forms Process using WD4A same like standard create Position u2026etc. to avoid Adobe forms. Could you please share your advises, suggestions and approach to be followed. Best feasible solutions.
    Where I can find the technical information of the Webdynpro Component: HRASR00_PROCESS_EXECUTE. If you any please share the same.
    Thanks in Advance.
    Regards
    SS

    Hi Sridhar,
    Check this.. might helps..
    http://help.sap.com/erp2005_ehp_05/helpdata/EN/4f/202423bbde4f3ebbb2654069378ecd/content.htm
    http://help.sap.com/erp2005_ehp_05/helpdata/EN/aa/d4e0064cd0499f8d05bd587907f764/content.htm
    WD component HRASR00_PROCESS_EXECUTE - HCMPF
    http://www.surfingincognito.com/index.php?q=aHR0cHM6Ly93ZWJsb2dzLnNkbi5zYXAuY29tL3B1Yi93bGcvMjA5MDU%3D
    Cheers,
    Kris.

  • Query to get parameter name and value after ran the conccurent program

    Hi All,
    Query to get the parameter name and value for completed concurrent program using the request id. can any one help me in this regard.
    Thanks,
    Red.

    Red,
    I have tried the same query and it works properly here.
    I have submitted "Purge Signon Audit data" concurrent program with "Audit Date" parameter set to 01-06-2009, and here is the query output:
    SQL> select request_id, phase_code, status_code,
    argument_text, argument1
    from fnd_concurrent_requests
    where request_id = '739664';
    REQUEST_ID P S ARGUMENT_TEXT        ARGUMENT1
        739664 C C 2009/06/01 00:00:00  2009/06/01 00:00:00Regards,
    Hussein

  • Extract cluster element names and values automatically

    Dear Labview forum,
    I would like to extract cluster element names and values automatically
    without prior knowledge of the cluster element size or contents.
    I am able to extract the names but have some trouble with the values.  (see attached VI)
    I wish to write each the cluster element name and value in a string, and then write the string to a new line in a file.
    Regards,
    Jamie
    Using Labview version 8.0
    Attachments:
    extract cluster element names and values automatically.vi ‏14 KB

    This can become arbitrarily complex, because a cluster can contain many types of data, even other clusters, arrays, typedefs, etc. So getting a "value" of an element is not as easy as you might think. There is a reason you get a variant.
    If all cluster elements are simple numerics you can use "variant to data" with the correct type. The attached shows a few possibilities. Modify as needed.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    extract_cluster_element_names_and_values_automaticallyMOD.vi ‏23 KB

Maybe you are looking for

  • New iMac to be purchased

    • I now own an iMac 333 mhz. bought 5/25/1999 • running OS 9.1 • needless to say I need to update • I really do not want to buy an Intel/iMac • Would I be really stupid to buy one of the last IBM built iMacs. • What would the greatest down-side for d

  • ITunes server times out (error 408) with some, but not all downloads

    The episodes failing to download are "Dawn of a New Day" part 2 from "Skyland" and "Program" from "Animatrix." Everything else, 11 episodes of "Skyland" and "Animatrix", downloaded fine, so it is hard to imagine that this has anything to do with my s

  • Drilling and navigating - can I have both?

    Is it possible to somehow get Answers to allow me to drill via dimensions and once at the lowest level, navigate to a separate report? I only see options to Drill or Navigate but I really want to do both. Can the system be tricked to do this? I have

  • Dynamic paragraph for Sapscript

    Hi all, I need to write a sapscript that require to get the paragraph from abap program. Is this possible for sapscript? Normally, we only choose the desire paragraph format on the left hand side on SE71. Can sapscript get the paragraph format via ab

  • Adobe Camera Raw Software and Adobe DNG Converter

    Are they two separate pieces of software - I have downloaded Adobe DNG Converter but cannot appear to be able to download Adobe Camera Raw for Mac