Get the session state of the order of the day in javascript

Is there anyway to get the value of an element of demand through jS?

[I have an app that loads a different source into an iframe depending on which page the user is.]  I can load this value in session state for a part of the application (or a point probably page) but for the redirect which is made in java script I don't know how to get the value of session.  [I do not have it as the value of the client side.]

Thanks guys, but I think that it would give me only the value in the DOm not in session state.  I had to make a page zero point and dynamic action that populated the in the DOM, and then I could use JS ($v) to get the variables.

I couldn't find a way to get session state directly.

Tags: Database

Similar Questions

  • How to get the 'DAY' based on the territory of current account held a number between

    Hi all

    Looks like I'm at the end of my intelligence here but how to get the 'DAY' based on the territory of current account with a number between 1 and 7? Oracle has functions to extract the day of the week, but I can't find the other way around.
    SQL> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    
    SQL> alter session set nls_territory=AMERICA;
    
    Session altered.
    
    SQL> select to_char (sysdate, 'D') from dual;
    
    T
    -
    3
    
    SQL> alter session set nls_territory=GERMANY;
    
    Session altered.
    
    SQL> select to_char (sysdate, 'D') from dual;
    
    T
    -
    2
    I need a way to know that the number '3' on the database with NLS_TERRITORY = AMERICA means a 'Tuesday' or the number '2' on a database with NLS_TERRITORY = GERMANY means "Tuesday" as well.

    Hope I am clear enough.

    And wish you all a happy new year :)

    Kind regards
    Smail

    Use the format "IW" to get the date of Monday and the format "DAY" to get the "first day of the week. Then compare dates to see if they are identical.

    ALTER SESSION SET NLS_TERRITORY = 'AMERICA';
    
    SELECT TRUNC(SYSDATE-LEVEL, 'IW') "Monday",
    TRUNC(SYSDATE-LEVEL, 'DAY') "NLS First day of week",
    MOD(TRUNC(SYSDATE-LEVEL, 'IW') - TRUNC(SYSDATE-LEVEL, 'DAY') + 7, 7) "1 if day 1 = SUN, 0 if MON"
    FROM DUAL CONNECT BY LEVEL <= 7;
    
    Monday    NLS First day of week 1 if day 1 = SUN, 0 if MON
    --------- --------------------- --------------------------
    31-DEC-12 30-DEC-12                                      1
    24-DEC-12 30-DEC-12                                      1
    24-DEC-12 23-DEC-12                                      1
    24-DEC-12 23-DEC-12                                      1
    24-DEC-12 23-DEC-12                                      1
    24-DEC-12 23-DEC-12                                      1
    24-DEC-12 23-DEC-12                                      1
    
    alter session set nls_territory = 'FRANCE';
    
    SELECT TRUNC(SYSDATE-LEVEL, 'IW') "Monday",
    TRUNC(SYSDATE-LEVEL, 'DAY') "NLS First day of week",
    MOD(TRUNC(SYSDATE-LEVEL, 'IW') - TRUNC(SYSDATE-LEVEL, 'DAY') + 7, 7) "1 if day 1 = SUN, 0 if MON"
    FROM DUAL CONNECT BY LEVEL <= 7;
    
    Monday   NLS First day of week 1 if day 1 = SUN, 0 if MON
    -------- --------------------- --------------------------
    31/12/12 31/12/12                                       0
    24/12/12 24/12/12                                       0
    24/12/12 24/12/12                                       0
    24/12/12 24/12/12                                       0
    24/12/12 24/12/12                                       0
    24/12/12 24/12/12                                       0
    24/12/12 24/12/12                                       0
    

    Or it could be simpler:

    ALTER SESSION SET NLS_TERRITORY = 'AMERICA';
    
    WITH DATA AS (SELECT LEVEL INPUT_DAY FROM DUAL CONNECT BY LEVEL <= 7)
    SELECT INPUT_DAY,
    TO_CHAR(TRUNC(SYSDATE, 'Day')+INPUT_DAY-1, 'DAY') "Day label"
    from data;
    
    INPUT_DAY Day label
    --------- ------------------------------------
            1 SUNDAY
            2 MONDAY
            3 TUESDAY
            4 WEDNESDAY
            5 THURSDAY
            6 FRIDAY
            7 SATURDAY
    
    alter session set nls_territory = 'FRANCE';
    
    WITH DATA AS (SELECT LEVEL INPUT_DAY FROM DUAL CONNECT BY LEVEL <= 7)
    SELECT INPUT_DAY,
    TO_CHAR(TRUNC(SYSDATE, 'Day')+INPUT_DAY-1, 'DAY') "Day label"
    from data;
    
    INPUT_DAY Day label
    --------- ------------------------------------
            1 MONDAY
            2 TUESDAY
            3 WEDNESDAY
            4 THURSDAY
            5 FRIDAY
            6 SATURDAY
            7 SUNDAY
    
  • How to get the day as a numeric value without the date in shape?

    Hello
    to reduce the costs of a sql statement, I need to get the day of a date under the number (to compare to a numerical value) value without formatting. Each formatting causes a complete table of the table scan and the date field. Is there a function for this problem?

    Version of Oracle's 11g.

    Thank you Carsten

    You can use EXTRACT...

    SQL> select extract(day from sysdate) from dual;
    
    EXTRACT(DAYFROMSYSDATE)
    -----------------------
                          7
    
    SQL>
    
  • How can I get a session state value in my apex or DML text field

    I put a session state in my procedure, in my text field in my I want to get the value of the form region. I try in my text field of the form in the default region, I try

    BEGIN

    APEX_UTIL.GET_SESSION_STATE('USER_SECURITY_PIN');

    END;

    but this does not seem to get the PIN of the session

    How can I do this please

    dave_414 wrote:

    I put a session state in my procedure, in my text field in my I want to get the value of the form region. I try in my text field of the form in the default region, I try

    BEGIN

    APEX_UTIL.GET_SESSION_STATE('USER_SECURITY_PIN');

    END;

    but this does not seem to get the PIN of the session

    How can I do this please

    Depends on the Type of default property item.

    Use a static text with Substitutions of State of Session with a string substitution of static text:

    &USER_SECURITY_PIN.

    or the body of the PL/SQL function (for example):

    return apex_util.get_session_state('USER_SECURITY_PIN');

    or Expression of PL/SQL with a bind variable reference:

    :user_security_pin

  • Get the day of the week (dow) of old date

    Hello

    Do you know how I can get any stored date (Mon, Mar) dow say in param:

    bizdate date: May 15, 2010 = ';

    day 3 VARCHAR2 (3);

    I use this first select statement of the double, but may not know how to replace the current date with the other,

    #1:
    Select to_char (sysdate, 'dy') in day 3 of double;

    #2:
    Select to_char('15-May-2010','dy') in the day 3 of double;
    How can I say this may 15, 2010 pl "to the date format?


    TX
    T

    Maybe this?

    SQL> select to_char(sysdate,'day') dow from dual;
    
    DOW
    ---------
    wednesday
    
    SQL> select to_char(to_date('15-May-2010','dd-mon-yyyy'),'day') dow
      2  from dual;
    
    DOW
    ---------
    saturday
    
    SQL> 
    
  • I can't download or get the day or devices drivers to run my computer rite, you can solve this problem for me

    I can't download or get the drivers or devices I have to get my computer to run the rite can you solve these problems over the computer, I tried everything its fact of the month

    What drivers you are trying to update?

    What devices you are trying to run it on the computer?

    What have you done so far?

    Have you been to the websites of the manufacturers for drivers updated to your computer?

  • get the day of the week: Monday, Tuesday...

    Hello
    Is there a system function to get the LUN, sysdate Mar in Oracle:
    Or do I have to go with the series of the Ifs after:
    Select double to_char(sysdate,'D');


    TX
    T
    SQL> select to_char(sysdate,'FMDay') from dual
      2  /
    
    TO_CHAR(S
    ---------
    Wednesday
    
    SQL> 
    

    SY.

  • Reg: select stmt to get the day of the week in the last 20 years

    Hello

    I need to write a select statement or procedure that can give a performance of only one day given in the past 20years 20years and contracts at end of the current week in the calendar.


    Thanks in advance

    Published by: user648380 on January 14, 2010 12:06 AM
    SELECT add_months(trunc(SYSDATE, 'IW'), -12 * 20) + (LEVEL * 7) monday
      FROM dual
    CONNECT BY LEVEL < (add_months(trunc(SYSDATE, 'IW'), 12 * 20) - add_months(trunc(SYSDATE, 'IW'), -12 * 20)) / 7
    

    Published by: fsitja on January 14, 2010 12:55 AM fixed... accident of copy/paste

  • Get the message: error [JavaScript Application]: Document.getElementByld (...) is null

    Occurs usually when I open another tab. I have to click on the 'OK' button two or three times to close the error message.

    Hi george, which is probably a problem introduced by the your extensions. to verify that you could run firefox in safe mode once and see if the problem is reproducible here as well...

    Troubleshoot extensions, themes, and issues of hardware acceleration to resolve common problems of Firefox

  • Get the objects on a page or get the selection with JavaScript?

    I have a bunch of page PDFs with an ornament on the page. I need to crop all pages the same distance of the ornament. The problem is that the ornament is never in the same horizontal position.

    I have the script where the operator cultures page tight for ornament and I use getPageBox and setPageBox to develop harvest evenly around the entire page, but I would like to completely automate it.

    Basically I need a way to know where the ornament is on the page. Is it possible in Java (I couldn't find one) to browse objects on the page to check their size?

    Thank you very much

    Ken

    Gobs much gratitude to MD_quake for posting back here when he or she finds his answer.

    It turns out that the boxes have BEEN changing, but the & #* $%! dialogue of cultures was not showing the changes on all the boxes! Save the file and open it again displays the boxes correctly. By mail to the MD, you can also use a preflight.

    I'm done with this JavaScript but could also change the media box to clean things up a bit.

    var TargetWid = 302

    var TargetHt = 477

    To display the culture for the page

    var CurrRect = this.getPageBox ({cBox: "Crop", nPage:0});})

    var AdjWid = (TargetWid-CurrRect [2]) / 2

    var AdjHt = (TargetHt-CurrRect [1]) / 2

    App.Alert (AdjWid);

    The value of the new culture area of the box (in pixels)

    CurrRect [0]-= AdjWid;  Adjust the left side

    CurrRect [1] += AdjHt; Adjust the upper part

    CurrRect [2] += AdjWid;  Adjust the right side

    CurrRect [3]-= AdjHt; Adjust the lower side

    Apply the new harvest area to the area of all pages

    this.setPageBoxes ({cBox: "Crop", nStart:0, nEnd:this.numPages - 1, rBox:CurrRect});})

    Reset the CurrRect to the new crop and adjust the other boxes

    var CurrRect = this.getPageBox ({cBox: "Crop", nPage:0});})

    this.setPageBoxes ({cBox: "Art", nStart:0, nEnd:this.numPages - 1, rBox:CurrRect});})

    this.setPageBoxes ({cBox: "Trim", nStart:0, nEnd:this.numPages - 1, rBox:CurrRect});})

    this.setPageBoxes ({cBox: "Bleed", nStart:0, nEnd:this.numPages - 1, rBox:CurrRect});})

    Best,
    Ken

  • How to get the days and months when two dates are given

    Hi all

    I have a requirement where I need to return the number of months and days between two given dates.
    I have no need to take account of the year as the difference in dates is always less than a year

    I have 28 June 2012 and January 31, 2013, as dates.

    I'm working on 10g

    When I select the double months_between(:a,:b) and provide the dates he gives me 7.09677
    I want to give only 7 months and 9 days, or what ever the exact days are.

    Your contributions are appreciated

    Try this:

    WITH t AS
    (SELECT TO_DATE('28-JUN-2012', 'DD-MON-YYYY') date1, TO_DATE('31-JAN-2013', 'DD-MON-YYYY') date2 FROM dual)
    SELECT TRUNC(MONTHS_BETWEEN(date2, date1)) months,
           date2 - ADD_MONTHS(date1, TRUNC(MONTHS_BETWEEN(date2, date1))) days
    FROM   t
    
  • How to get the Slide Spry function to remember the Position?

    Hello

    I'm building a site with a horizontal bar that dynamically loaded thumbnails of images, and the user can click on the left arrow or right arrow to 'slide' left and right images (kinda like Netflix interface more recent, if you saw that). In order to do fast ' n' easy, I used the Spry (SpryEffects.js) effects - in particular, the function of slip (MM_effectSlide() or Spry.Effect.DoSlide ()).

    I would like the user to click on the right arrow and see the next, say, 10 images, then the next 10 years and so on. To do this, I created a long DIV inside another "masking" DIV and Spry said to slip inside the DIV. It all works well.

    However, I have difficulty getting the Spry to start from the CURRENT position and drag it to a new location. If I let the option "go" as null, it always starts in one position other than the current position.

    Does anyone have any tips/pointers/suggestions? I'm rather not recreate the entire functionality of Javascript, but rather hack the current functions of Spry.

    Thanks in advance!

    JP

    It seems to me that if you use the functionality of Spry evil. To do what you want, you Spry sliding panels.

    Unfortunately, Spry sliding panels are not incorporated into Dreamweaver, you should encode everything yourself. The documentation is here:

    http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsSample.html. You will also need to download the framework Spry on Adobe Labs to get the relevant external JavaScript files.

  • How to get the Blackberry ID using javascript for Webworks App?

    Hi all

    I have developed a web application using Blackberry webworks SDK and emulator Ripple... Here, I need to get the Blackberry device ID using javascript... Please me... Thanks in advance...

    With respect,

    Marimuthu_P

    HM... There is a sample to get the PIN with javascript.

    https://developer.BlackBerry.com/HTML5/APIs/BlackBerry.identity.html#.UUID

  • Get the last day of the month

    Hello

    How can I get the (day number of the) last day of a given month and year?

    So, if

    year 2015 = and month = 1, the output should be 31

    year = 2012 and month = 2 while production is expected to be 29

    year 2013 = and month = 2 while production is expected to be 28

    etc.

    Y at - it no OBIEE to achieve? If not, then a command SQL Oracle is very good too (I prefer OBIEE however)

    Thanks in advance,

    Erik

    You start from the first day of the month, you add 1 month [TIMESTAMPADD (SQL_TSI_MONTH, 1, 'your date')], you must subtract 1 day [TIMESTAMPADD (SQL_TSI_DAY,-1, 'your date')] and use the DAYOFMONTH function to get the number of the last day of the month [DAYOFMONTH ('your ' date')].

    All these calls nesting together and you're there.

  • How to get the value of the outputtext in javascript and send it to backing bean

    Hi Experts ADF,

    JDev Version 11.1.1.7.0

    I have the following: the value of the outputtext must be treated in javascript and the serverlistener method has the same value. I founded this value returns a string that wshould see the mouseover NIJ.

    Help, please. Thanks in advance.

    < af:column sortProperty = "#{bindings." OrderProposalReadClient.hints.exceptions.name}.

    filterable = "true" sortable = "true".

    headerText = "#{suiviewBundle.EXCEPTIONS} '"

    ID = "c16" >

    < af:outputText value = "#{row.exceptions}" id = "ot32" clientComponent = "true" > "

    < af:clientListener type = "mouseOver".

    method = "customJsFunction" / >

    < af:serverListener type = "mycustomserverEvent".

    Method="#{pageFlowScope.ChangeOrderProposalBean.handleServerEvent}"/ >

    < / af:outputText >

    < / af:column >

    JavaScript

    < af:resource type = "javascript" >

    var customJsFunction = function (event)

    {

    var exceptiondata = AdfPage.PAGE.findComponentByAbsoluteId ('ot32');

    AdfCustomEvent.queue ();

    Returns true;

    }

    < / af:resource >

    BackingBean

    public String handleServerEvent(EC ClientEvent)

    {

    Please let me know how to get the value that javascript code sends here.

    Let's say javascript sends the value of outputtext as "001".

    So, I have to check "001" in my list and return a value that appears on mouseover.

    }

    Kind regards
    Roy

    Hello, Roy.

    To use the value on another component of the user interface, I shows an example:

    -code of the page

    shortDesc = "shortDesc" >

    method = "customJsFunction" / >


    -the javascript code

    var customJsFunction = function (event)

    {

    var exceptiondata = event.getSource ().findComponent("ot32").getValue ();

    AdfCustomEvent.queue (event.getSource (),

    "mycustomserverEvent,"

    {param1:exceptiondata},

    (true);

    Returns true;

    }

    -OutputTextCase11.java

    public void handleServerEvent (EC ClientEvent)

    {

    String param = (String) ce.getParameters () .get ("param1");

    RichOutputText outputText = (RichOutputText) ce.getComponent () .findComponent ("ot1");

    outputText.setShortDesc (param);

    outputText.setValue (param);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (outputText);

    }

    I hope this helps you.

    RFH.

Maybe you are looking for