Set variable from cookie value

Hi,
I have a website that saves a cookie to your browser when you log in,
The cookie value is the name of the user.
I want to see if I can read this value in captivate and set it as a variable in the content therefore no need to re-enter details in the content.
I have tried to tackle this using JS but my experience is limited.
Im using Cp8.
Thanks in advance...

Hi VC, thanks for reply,
//try to set the value and see if it works
$s('P1_ID_PER_KND_NA_CRYPT','A422313E7F62D04D12347E7DE85DC53E')doesn´t work either, firebug brings up no error but i get an checksum error for this element from the apex engine, I will test the Apex internal GetCookie Function but my own function work very well too, the error is after that...
what i see, i also get the checksum error when using the varibable id_per_knd_na, too.
so i think, javascript tries to set the value to the hidden element, but the apex engine prvented it because of SSP.
Any other ideas?
ps: i use apex 4.0.2

Similar Messages

  • Can you control format when setting variable from dashboard prompt?

    I'm setting a session variable from a calendar date prompt in a dashboard prompt, and the variable is referenced in a calculation in the business model. I'm initializing the date prompt from another variable which returns format TIMESTAMP 'YYYY-MM-DD 00:00:00', and the initial load of the dashboard is successful. After changing the value of the date prompt, the query fails because the prompt sets the variable to 'mm/dd/yyyy'.
    My question is: Is there any way to control the formatting when setting a variable from a dashboard prompt? I would like to get the timestamp format.
    Thanks,
    Greg

    If You wants time than in dashboard prompt's coloumn formula use cast function as "cast(date as time)" if date than "cast(date_col_name as date)". But I also have that one problem.Firstly tell me, Is it possible that using two dates in using betwwen operator in dashboard. We access server variable. If not working one thing more that u should have filter on date coloumn in report layout.And in action coloumn u select prompted. Than It will must work.
    Thanks
    Haroon

  • Setting variables from a testcase?

    Hello,
    How do I access variables from my BPEL flow from a testcase?
    I need to set some header variables and such that is not availible in the emulate tab so I am looking for a way to manualy in my testcase add/alter/read variables from the BPEL flow?
    I know this "could" be emulated by setting them in the normal flow but since it is test specific I would like to avoid adding thing to the flow and instead have them in my "test case".
    // MickeM

    shouldn't I also be able to access the outer classes methods? It doesn't seem to do this either.

  • Setting variables from inner class

    I have a GUI that takes users information and provides a quotation as componants are clicked. My componants' Listeners are in seperate inner classes and from these I want to add certain details to variables, it seems to compile and run but it doesn't seem to be changing the value of the variable when the componants are clicked, is there any reason why this happens, my code is below:
    public class MyGUI extends JFrame{
            public MyGUI(){
              //GUI STUFF HERE
            double Price;
         private String total=calculate();
         public String calculate(){
              double aTotal=Price;
              return "$ " + aTotal;
         class MyListener implements ItemListener{
              public void itemStateChanged(ItemEvent evt){
                   if(evt.getSource()==rad1) {
                   Price=0.10;
                   else if(evt.getSource()==rad2) {
                   Price=0.12;
                        totalLab.setText(total);
    }

    shouldn't I also be able to access the outer classes methods? It doesn't seem to do this either.

  • Set Variables from HTML

    Here is the set up, I have a video player embedded in an html
    file. The player will play a lead in video for branding purposes IF
    the user has not viewed this lead in video yet. ELSE it wil play
    the video they specified and then continue to play the rest of the
    videos in a que.
    Everything is fine except, the current video is dependant on
    the HTML page the view is at and I would rather just have 1 swf
    file rather than 1 swf file for every video.
    So my question is, how can i get the HTML page to tell the
    swf file which file to load after the lead in file. I essentially
    need to send this parameter from the HTML file to the swf file -
    How do I do that??
    Thanks!

    Using FlashVars is just appending the variable to the SWF's
    url. So, in your embed script, where ever you have the path to your
    SWF, like, mymovie.swf, you just append whatever variable you need
    to that. So, lets say you want to pass in a name, you would use
    mymovie.swf?name=dzedward
    Then, in flash retrieve it like so:
    root.loaderInfo.parameters.name;
    Lets say you want to pass in first and last name:
    mymovie.swf?firstName=Damon&lastName=Edwards
    retrieve it like so:
    root.loaderInfo.parameters.firstName;
    root.loaderInfo.parameters.lastName;
    Now, if you're using SWFObject to embed your SWF, its as
    simple as:
    so.addVariable("name", "dzedward");
    retrieving it the same way as above.

  • Setting variables from path

    How can I set the name of a value from an alias such as
    "P & M:Editorial Photography:THISFOLDER:fpo:Book Shelf:"
    to
    "THISFOLDER"
    Basically I want to set the name of a value to whatever the name of the second level folder up from the given path is.
    Pedro

    on script_title()
    Filename : ExtractDirNameFromPath.scp.as
    Pathame : ExtractDirNameFromPath.scpt (Script Debugger)
    Author : Bill Hernandez
    Version : 1.0.0
    Updated : Friday, December 15, 2006 ( 12:18 AM )
    end script_title
    -- ---------+---------+---------+---------+---------+---------+---------+---------+ ---------+---------
    on script_notes()
    How can I set the name of a value from an alias such as
    "P & M:Editorial Photography:THISFOLDER:fpo:Book Shelf:"
    to
    "THISFOLDER"
    Basically I want to set the name of a value to whatever the name of the
    second level folder up from the given path is.
    Pedro
    end script_notes
    -- ---------+---------+---------+---------+---------+---------+---------+---------+ ---------+---------
    property NoOfLevelsFromTheEnd : 2
    -- ---------+---------+---------+---------+---------+---------+---------+---------+ ---------+---------
    on run
    tell me
    set delim to ":"
    set theText to "P & M:Editorial Photography:THISFOLDER:fpo:Book Shelf:"
    set aList to SplitString(delim, theText)
    set NoOfItems to count items in aList
    set whichItem to (NoOfItems - NoOfLevelsFromTheEnd)
    set myVar to (item whichItem of aList)
    my ShowMsg(myVar, 5)
    end tell
    end run
    -- ---------+---------+---------+---------+---------+---------+---------+---------+ ---------+---------
    on SplitString(delim, theText)
    if (the last character of theText is equal to delim) then
    set theText to (characters 1 thru -2 of theText) as string
    end if
    set old_delims to get AppleScript's text item delimiters -- always preserve original delimiters
    set AppleScript's text item delimiters to delim
    set theList to text items of theText
    set AppleScript's text item delimiters to old_delims -- always restore original delimiters
    return theList
    end SplitString
    -- ---------+---------+---------+---------+---------+---------+---------+---------+ ---------+---------
    on join(theList, delim)
    set old_delims to AppleScript's text item delimiters -- always preserve original delimiters
    set AppleScript's text item delimiters to delim
    set theStr to theList as string
    set AppleScript's text item delimiters to old_delims -- always restore original delimiters
    return theStr
    end join
    -- ---------+---------+---------+---------+---------+---------+---------+---------+ ---------+---------
    on ShowMsg(s, howLong)
    tell application "Finder"
    activate
    if (howLong = 0) then
    set theTime to 3
    else
    set theTime to howLong
    end if
    set b1 to "OK"
    display dialog s buttons {b1} default button {b1} giving up after theTime
    end tell
    end ShowMsg
    -- ---------+---------+---------+---------+---------+---------+---------

  • How to set SORT_AREA_RETAINED_SIZE from a value to NOT SET in spfile

    Hi,
    I am trying to change the SORT_AREA_RETAINED_SIZE=148374 to NOT SET in spfile using the following command:
    alter system set SORT_AREA_RETAINED_SIZE='' scope=spfile;
    but couldn't get this?
    is there any other way except changing manually in pfile and change to spfile?

    Did you restart the instance after you make the change? The values from the spfile are read only at instance startup.

  • Set variables from recordset

    I have an SQL table that I store OrderID, ItemID, Qty.  There are 15 possible ItemID's (will never be more).  I need to output the order into a single table row that shows the orderID and the qty for each item.
    For example:
    <cfquery name="orders" datasource="xyz"
    Select *
    From solditems
    Where orderid = 'Order1"
    </query>
    Would return something like:
    Order1, Item3, 6
    Order1, Item4, 7
    Order1, Item18, 10
    The table needs to look like:
    <tr>
    <td>#orderID#</td>
    <td>#item1qty#</td>
    <td>#item2qty#</td>
    <td>#item3qty#</td>
    <td>#item4qty#</td>
    <td>#item5qty#</td>
    <td>#item6qty#</td>
    <td>#item7qty#</td>
    <td>#item8qty#</td>
    <td>#item9qty#</td>
    <td>#item10qty#</td>
    <td>#item11qty#</td>
    <td>#item12qty#</td>
    <td>#item13qty#</td>
    <td>#item14qty#</td>
    <td>#item15qty#</td>
    </tr>
    I'm at a loss trying to figure out how to match the row from the results of the record set into the right #itemXqty#.
    Hope I explained this well and thanks in advance for pointers in the right direction!
    Gary

    You could do something like
    <cfoutput><table border="1"><tr><th>#orders.orderID#</th></cfoutput>
    <cfoutput query="orders">
        <td>#itemID##qty#</td>
    </cfoutput>
    </tr></table>
    For a start, your query would be more efficient using "select orderID, itemID, qty" instead of "select *" (assuming, of course, that the table has more than the 3 columns).

  • Setting webbean from the value returned to PFR ?

    I have a button on my custom page, say "View Results", invoking it returns a string value internally
    so in my CO - PFR :
    if (pageContext.getParameter("pressButton") != null)
    String str = (String)(am.invoke("viewDetails")) ;
    System.out.println("in PFR " + str)     ; //prints fine
    I want to set this value of returned str to a webBean of the type :OAMessageStyledTextBean
    I know I should do it in Process request
    but when I test for user pressed the button, it doesnt give me anything.
    if (pageContext.getParameter("pressButton") != null)
    String str = (String)(am.invoke("viewDetails")) ;
    System.out.println("in PR " + str)     ; // doesnt print
    I figured a way out but not sure if its correct.
    I used pageContext.setForwardURLToCurrentPage() in PFR and then SOP in PR gets printed. Then I set the value of msgstyletext bean.
    Kindly guide me
    Thanks

    Guru is right there are two ways , recalling process request should be the last approach,while coding in OAF, as the entire page hirarchy is refreshed. Instead here you can :
    1) Use Databound values and attach messagestyle text bean text attribute to a VO column.
    2)Use Message textinput with read only property true and attach it with vo attribute.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ODI-SET VARIABLE IN PACKAGE

    HI.
    I am using odi11g.
    i set variable "STARTTIME" To sysdate .
    And "END_DATE" to a default value-- '20-JUNE-1981'.
    Now in package i dropped the variable "end_date",and put the TYPE to "SET VARIABLE" and the value as below:
    #VARIABLES_STARTTIME.[ The projects name is VARIABLES]
    But the value of "end-date" isnt getting reset to STARTTIME.
    should there be a different syntax.

    HI,
    Refresing the variable is working thanks.BUT i was trying to use the variable in a loop.
    Where when the package is run fo rthe 1'st time the variable 'LAST_UPDATE' value should be '20-JUNE-1981' and then it should get set to the value present in 'STARTTIME" for the next time the package is run.
    So, in this case, i need to set the value of the variable in the package itself.
    #VARIABLES.STARTTIME isnt getting set.
    i tried the package as per the below link:[ i use odi1g though]
    http://blogs.oracle.com/dataintegration/entry/using_variables_in_odi_the_tim

  • Can I set a Session Variable from a Dashboard Prompt, using values that are

    Hi All
    Trying to set a Session Variable to an integer value, by letting users select a text value from the drop-down list on a Dashboard Prompt. The goal is to set the input parameter to the IndexCol function, but to provide the end users with a text description of what they are setting.
    Select Value Set Variable Value
    My 0
    My Team 1
    My Companies 2
    My Teams Companies 3
    Any suggestions on how to accomplish this? Certainly we could populate the drop-down from a data source, however I don't see how to populate a variable with something other than the values on the screen.
    The IndexCol function is referenced in a Filter in Answers, and I'm thinking to populate a Session variable using the (Presentation) variable value set from the prompt. But how to do this? I see a reference to a function NQSSetSessionValue(), but cannot find documentation on how it works.
    Any clue will be greatly appreciated.
    Thanks

    Hi kishore..
    Looks like the link u have sent uses advanced SQL tab to set session variables. I want to know if I can use "set variable NQ_SESSION.myvar= @something" in the "SQL results" -while creating a dashboard prompt-.
    Purpose: I want the session variable to be set based on whatever report that im currently in.
    And i dont want to use presentation variables because im using a reset button in my page.
    My reset script resets presentation variables and NOT session variables.
    Thanks in advance
    Loy

  • Setting the cookies value

    hi,
    when i do, submiting the page i'm able to set the cookie value.I'm not getting any messages. But the Same time when i call the proceudre with parameters from the URL i'm not able to store the cookie value.
    It display's the message like this and the value is not stored in the cookies
    Content-type: text/html Set-Cookie: emp_no=9999X; path=/;
    my code is :
    owa_util.mime_header('text/html',FALSE);
         owa_cookie.send('emp_no',UPPER(lv_emp_no),null,'/',null,null);
    owa_util.http_header_close;
    How do i solve this problem?
    Thanks

    Hi,
    Here are a couple of things you can try:
    1) remove the following line because it shouldn't be necessary:
    the_cookie.num_vals :=0;2) remove the following line because the owa_cookie.send will automatically replace any existing cookie:
         owa_cookie.remove('emp_no',the_cookie.vals(1),null);3) try capturing the cookie value in a local variable and printing it (after htp.body, of course) to see if it is working correctly.
    4) enable the browser to prompt you when a cookie is being set so that you can verify whether it is being set or not.
    HTH,
    Ashesh Parekh
    Oracle9iAS Product Management
    hi,
    Something like this...
    Code
    PROCEDURE checkLogin ( emp_no in varchar2 default NULL) IS
         pv_check_f      BOOLEAN ;
    the_cookie      owa_cookie.cookie;
    BEGIN
    pv_check_f := FUN_EMP_PASSWORD(UPPER(emp_no) ) ;
    IF NOT pv_check_f THEN
         v_msg := 'Sorry Log on denied';
         RAISE EMP_ERROR;
         END IF ;
    the_cookie.num_vals :=0;
    the_cookie:= owa_cookie.get('emp_no');
    if the_cookie.num_vals= 0 then
              owa_util.mime_header('text/html',FALSE);
              owa_cookie.send('emp_no',UPPER(emp_no),null,'/',null,null);
              owa_util.http_header_close;
         else     
              owa_util.mime_header('text/html',FALSE);
         owa_cookie.remove('emp_no',the_cookie.vals(1),null);
              owa_cookie.send('emp_no',UPPER(emp_no),null,'/',null,null);
    owa_util.http_header_close;
    end if;
    htp.p('<script language="javascript">
    window.location="http://www...URL";
    </script>');
         htp.formclose;
    EXCEPTION
         WHEN EMP_ERROR THEN
         Pageheader;
    Procedurename.Banner('Login denied');
    htp.fontOpen('red','Arial Narrow');
    htp.header(3,lv_msg);
    loginagain;
    htp.fontClose;
    htp.centeropen;
         htp.br;
         htp.p('<INPUT type="button" value="Back" onClick="history.back()">');
         htp.br;
         htp.centerclose;
    pagefooter;
    END checkLogin;
    calling the Procedure "checklogin" with the parameter emp_no from the URL like this
    "http://....:8810/dir/Packname.checkLogin?emp_no=9ABCDS".
    Waiting for ur replay.
    Thanks.

  • How to set cookie value in one page and retrieve in another page using setA

    How to set cookie value in one page and retrieve in another page using setActionListener?
    I have tried with following code srcpage.jspx->destpage.jspx
    srcpage.jspx
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
    var="emp" rows="#{bindings.EMPView1.rangeSize}"
    first="#{bindings.EMPView1.rangeStart}"
    emptyText="#{bindings.DepartmentsView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
    <af:column sortProperty="EmployeeName" sortable="false"
    headerText="Cookie Testing">
    <af:commandLink text="#{emp.EmployeeName}" action="success">
    <af:setActionListener from="#{emp.EmployeeName}"
    to="#{cookie}"/>
    </af:commandLink>
    </af:column>
    </af:table>
    espage.jspx
    <af:outputText value="Test Cookie Value: #{cookie}"/>
    ,Here Test Cookie Value prints the following instead of its original String value
    {JSESSIONID=javax.servlet.http.Cookie@7da288, oracle.uix=javax.servlet.http.Cookie@399f62}
    I have passed employee name "Robert" to cookie in srcpage.jspx,but it prints "JSESSIONID....." instead of "Robert" in destpage.jspx
    Thanks in advance
    Kalee

    Hi,
    "cookie" is a reserved name. If you want to write to a session scope attribute called "cookie" then you have to call #{sessionScope.cookie}. If you want to use EL to set and read from cookies then you will have to use
    #{cookie.cookieName}
    Note that #{cookie} writes to and returns a map
    check this: http://www.informit.com/articles/article.aspx?p=30946&seqNum=7
    Frank

  • How can I set a variable number of values in a SQL IN clause?

    Hi,
    How can I set a variable number of values in a SQL IN clause without having to change the text of the SQL statement each time?
    I read the link http://radio.weblogs.com/0118231/2003/06/18.html. as steve wrote.
    SELECT *
    FROM EMP
    WHERE ENAME IN (?)
    But we need the steps not to create type in the system and would there be any other solution if we would like to use variable number of values in a SQL IN clause ?
    We are using JDeveloper 10.1.3.2 with Oracle Database 10.1.3.2
    Thanks
    Raj

    Hi,
    can you please explain why the solution from steve is not the right solution for you.
    regards
    Peter

  • Dynamically Setting a Variable from a Connection String that has been set by a Config File

    Hi Guys
    I'm setting up a Master / Slave (Parent / Child) dtsx environment but I'm unable to work out how to dynamically set a variable in the Master dtsx from a connection string that has had its value set by a config file. I'm sure it's possible.
    Below is the what I'm hoping to achieve. I've set up everything apart from the highlighted section.
    Any ideas?

    First, what version of SQL Server are you using?
    You could switch the problem around.  You could set the value of a variable from the config file, then it is easy to use that variable as the connection string source for your connection manager.  At the same time you can use a parent variable
    configuration to map that variable to variables in your child package.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

Maybe you are looking for

  • How to Create MM Quotaion with Pricing Conditions against RFQ through ME47?

    Hi, I got a requirement to Create MM Quotation against Request for Quotation with Pricing. I got a Function Module BS01_MM_QUOTATION_CREATE to Create Quotaion but there is no Parameter to Pass Pricing Conditions. Can anyone suggest me to Create MM Qu

  • How can i talk to a live person

    i need to speak to a live person, how do i do that?

  • Linux Partitions  - tmpfs

    We have installed oracle linux 5.x using the custom partitioning and the OS installation was successfully completed and we were able to access the Linux OS without any issues. But, while observing the /etc/fstab file, it has an additional partition e

  • How to Insert An SM (service mark) in Contribute?

    Hi, This does not seem to be included in the special characters section. Any suggestions? Thanks Sam

  • Multiple Trendlines in One Chart

    I need to show two trendlines in a chart - Mean and Linear Regression.  I cannot seem to set them to be different colors.  Short of calculating one of these trendlines on the backend and making it the "series" and having Crystal calculate the other o