Set cookie to remember user selection

Help needed. I need to set a cookie to remember a selection from a menu list exaclty like this UPS example:
http://www.ups.com/
However, I can't seem to find this exact code and was hoping to do this with javascript on an HTML page and without any server side code. Can this be done? I'd appreciate any help. Thanks.
John

I need to set a cookie to remember a selection I can't seem to find this exact code and was hoping to do this with javascript
learn how to fish:
http://www.google.com/search?q=javascript+set+cookie
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.

Similar Messages

  • Xsql:set-page-param from multirow select into array variable

    I'd like to set an XSQL page array variable to the result of a query that returns multiple rows.
    Can I do something like this:
    <xsql:set-page-param name="users[]">
    select username from all_users
    </xsql:set-page-param>
    The documentation only mentions usage like
    <xsql:set-page-param name="users[]" value="SCOTT SYS SYSTEM"/>

    The set page param is only designed to look at the first column of the first row of its query results.
    If you supplied a PL/SQL function that would return the list of users as a space-or-comma-separated string, then you could use:
    select your_function() as user_list from dual
    and then add the treat-list-as-array="yes" attribute to achieve this.

  • If the setting is "never remember history", and user clear the caches/cookies and logs on a website will the previous setting of the user on the web app persis

    ON the firefox, the setting is set to "Never remember history" .
    I have a web site which sets the default value on the record per page dropdown list to 100 for every tab.
    When I change the value to 5 and then logout. clear the caches/cookies . and then reload the page and then login to the website the value is showing as 5? why is it so? since the default value of the dropdown on fress login should be displayed as 100. I am facing this issue in Firefox 20.0.1 and on Internet explorer its working fine, the default value of the drop down is showing up as "100" . Let me know what behavior is expected on firefox on the above mentioned issue. This relates to firefox browser only.

    Are you sure the setting is stored in an HTTP cookie (regular browser cookie), and not on the server or in some other kind of local storage (e.g., Flash LSO)?

  • Set all checkboxes of the selected column by user at run time

    Hi ,
    I have a table control tab_500 with the 3 columns of checkboxes. When user selects particular column, and click on the buttone 'Select All', all the checkboxes of that column should get selected.
    loop at tab_500-cols into cols_500.
      if cols_500-SELECTED = 'X'.
      endif.
    endloop.
    How to do this.
    Thanks in advance,
    Regards,
    Madhuri

    Hi,
    In PAI write this code..
    DATA wa_table TYPE cxtab_column.
    IF SY-UCOMM EQ 'SELALL'.
         LOOP AT <tablecontrol>-cols INTO wa_table.
            IF wa_table-screen-name CS <checkbox colume name in upper case>
               AND  wa_table-selected = 'X'.
              itab-check1 = 'X'.      " Check box field set to X
              MODIFY itab TRANSPORTING check1 WHERE check1 = space . " modify the internal table
            ENDIF.
          ENDLOOP.
    ENDIF.

  • Display the panel container when user select the specific tab in a tab set

    Hi SAP Experts,
    I've faced some problems and i would like to seek some help from the experts.
    Basically, my requirement is to display the component "panel container" which contains some data whenever a user select e.g. Tab "A" of my component Tab set. Similarly, it hides again when the user select Tab "B" and another panel container appear for it.
    I am not sure if this is achievable in Xcelsius. Experts, please advise me.
    Your help will be greatly appreciated!
    Thanks a lot!
    Feel free to clear any doubts with me
    Best regards,
    htoh

    actually, you can not do that, since you dont have a reference of the current selected tab

  • Trying to set attribute value based on user selection of another attribute

    I am trying to set an attribute value based on the user's selection of another attribute using JSP EditCurrentRecord. When the user chooses the AreaId from the combo box I want to look up the value of the RgnID, preferrably without the user seeing this field at all. Below is my code which does not work. When I run it I get Error Message: null. Any suggestions are appreciated!!
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <%
    RowEditor.initialize(pageContext, "MyProject2_package1_SRSecurityModule.UsrAreaWhView");
    RowEditor.setTargetUrl("UsrAreaWhView_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setDisplayAttributes("OracleId, RgnId, RegionKey, AreaId");
    RowEditor.useEditField("OracleId");
    RowEditor.getFieldRenderer("OracleId").setPromptText("Oracle ID");
    RowEditor.useEditField("AreaId");
    RowEditor.useComboBox("AreaId","AreaWhView","Area","AreaKey");
    RowEditor.getFieldRenderer("AreaId").setPromptText("Area");
    RowEditor.useEditField("RgnId");
    RowEditor.getFieldRenderer("RgnId").setPromptText("Region");
    RowEditor.getRowSet().getViewObject().getCurrentRow().setAttribute("RgnId",RowEditor.getRowSet().getViewObject().getCurrentRow().getAttribute("RegionKey"));
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.render();
    %>
    </jsp:useBean>

    ok, sorry everyone for making it confusing; this is what I am
    trying to acheieve;
    I would like the user to populate my database with thier
    username AND userID. I have a dropdown box with thier username
    dynamicly populated already, what I am trying to achieve, is a way
    of when the user selects thier username either another dropdown or
    a hidden field is automatically populated with the appropiate
    userID (to match thier username). Now I could just have two
    dropdowns and they select both, but i'd rather avoid the
    possibility of mismatches, and that is why I would like it to be
    automatic and based on thier username selection...
    Does that make sense....?

  • How do i set firefox to remember my user id and password for yahoo mail. i've changed my yahoo password, so i want firefox to remember the new ones.

    I want to know how to set firefox to remember my yahoo mail id and password. i've changed my password, but firefox only remember the old password. So, i've erased it in the security settings.

    If the name stays the same and you only need to change (update) the stored password then fill the name in the login form and let Firefox fill the wrong password.
    You may have to press the Tab key to fill the password field.
    If you replace the wrong password with the new password then Firefox should offer to store the new password.
    Yahoo uses "autocomplete=off" to prevent Firefox from saving passwords, so you need to use the ''Remember Password'' bookmarklet.
    You can verify that Firefox has stored the new password: Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
    If that didn't work then remove that name and password and Firefox should offer to save the new password on the next visit or if you refresh the login page.
    See also:
    http://kb.mozillazine.org/Password_Manager
    http://kb.mozillazine.org/User_name_and_password_not_remembered (bookmarklet)
    http://kb.mozillazine.org/Deleting_autocomplete_entries

  • Why can't I block google's cookies? Everytime I select their domain to be blocked, their cookies STILL show up when I check 'Show Cookies.' Not cool..

    I've done -both- selecting & blocking the domain name of Google for prefs, etc from it's website AND using the Firefox security options page and typing in Google's domain name then selecting it to remove its cookies. But every time I check the "Show Cookies" tab, google is STILL there in the cookie list even after I've done all this stuff. What must I do, what secret domain name must I type to ensure Google doesn't track me?
    I'm already using DuckDuckGo as my sole search engine so there is NO reason why google should be able to attach cookies to me as I am NOT USING GOOGLE. Please help.
    Thank You!
    EarthGrrl

    I believe I have found the problem AND solution
    From another forum, someone suggested that the cookies.sqlite file may be at fault, it is (normally) found in:
    C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxx.default
    What I did was rename the file by appending a ".X" to the name in case I needed it again. The renamed file is cookies.sqlite.X . Note that you have to exit Firefox to rename the file. When Firefox is started again, a new cookies file will be created with no cookies.
    This may be a PITA if you have or need a lot of cookies for your frequently visited web sites but it did eliminate the Google cookie.
    Remember to have your settings in the Tools>Options>Privacy for history set to "Use custom settings for history" set according to your preferences.
    NONE of the previous "answers" worked for me but I hope this works for you. It worked for me.
    Regards,
    Teri

  • Firefix no longer asks to remember user names or passwords.

    Firefox no longer asks me if I want it to remember user names and passwords. Except for those it had previously done so. I have the box checked in settings for it to do so, but it does not. This occurred after the update, an update I was reluctant to do in the first place.

    Make sure that you do not run Firefox in permanent Private Browsing mode.
    *https://support.mozilla.com/kb/Private+Browsing
    *You enter Private Browsing mode if you select: Tools > Options > Privacy > History: Firefox will: "Never Remember History"
    *To see all History and Cookie settings, choose: Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    * Deselect: [ ] "Permanent Private Browsing mode"

  • [CS3][JS][ScriptUI] Observing changes to user selection (advanced)

    I have a simple ScruitUI palette working in InDesign which displays the area of a selected page item.
    When the user selects a page item and launches the palette the area is calculated and the palette displays the result correctly.
    I cannot work out, however, how to update the calculated area when the user changes the selection. I can use the onMove and onResize events on the palette window to trigger the recalculation, but I would like another way that did not involve the user moving or re-sizing the palette. Something like onActive so that all the user had to do was click on the palette to trigger a recalculation.
    The simple way out is to create a button on the palette which the user clicks to update the area information, and this may be the best I can do at the moment. I was just wondering if any of the experts had some insight into other techniques for observing changes to selection from a palette. It would be amazing to have a scripted observer that could change the palette without the user doing anything special, in the same way that InDesign panels (like Info) work, but I realize I'm asking a lot from a scripting DOM that is already amazingly comprehensive.

    Hi Kasyan,
    Below roughly what I sent to Simon - it is not a full solution, but demonstrates the techniques you need.
    With APIDToolAssistant installed and a document open, create a page item on the pasteboard; this page item will be used as a 'controller' for this demo. Select it and bring up the APID ToolAssistant palette.
    Set the list of subjects to "*"
    Set the event filter to "subjectSelected#myLittlePaletteEngine, subjectDeselected#myLittlePaletteEngine".
    This captures the selection and deselection events for all page items, and routes them into a persistent engine (myLittlePaletteEngine) for handling.
    Because the engine is persistent, it will 'remember' gPalette and gField on subsequent events after they have been created the first time around.
    Set the script to:
    var gPalette;
    var gField;
    var gController = theItem;
    function CreatePalette()
    gPalette =
    new Window(
    "palette",
    "What is it");
    gField = gPalette.add("statictext",[0,0,200,20],"testfield");
    if (gPalette == undefined)
    gController.setDataStore("$GROUP_EVENTS$",true);
    CreatePalette();
    gPalette.show();
    gField.text = app.selection.toString();
    This does work for 'page item' selections - it won't work for text selections. To make that work too, you need to change the event filter to "*#myLittlePaletteEngine" (* is a wildcard and matches all events, including idle - which is used to update the text selection info).
    This last method (relying on idle) is not terribly good or efficient; I am currently looking how I could avoid the need for capturing 'idle' in version 1.0.46 (which will support CS4).

  • Cant get com.apple.security.files.user-selected.read-only entitlement to work

    Hey I am curious how can I get the .ipa compiled file for iOS to be able to read all the directories on the iPhone?
    I made a file browser but I cant get to the pictures
    I tried adding the entitlements in Flash Builder 4.6 in the descriptor file like this:
    <key>com.apple.security.files.user-selected.read-only</key>
    <true/>
    <key>com.apple.security.assets.movies.read-only</key>
    <true/>
    <key>com.apple.security.assets.pictures.read-only</key>
    <true/>
    in the
      <iPhone>
            <Entitlements>
            <![CDATA[
    I got Push notifications working and accepted in the app store but it can't read the pictures directory when browsing for a file
    I know the app id and stuff is set up right or I wouldnt have been able to get it accepted in the app store.  In the entitlements area of course I have the application identifier set and aps-environment and keychain access groups and whatnot set up right.
    When I try to put the app onto the iPhone with iTunes it just says 'Entitlements are not valid' (does not mention anything about mismatched ids) I can't find anything about how to add this entitlement and I could have sworn I saw a thing that said I can just use the descriptor file to add entitlements in some of the documentation I have it set to use air 3.4
    Is there something I am doing wrong, how do I get apple to just put these entitlements in the mobileprovision file, I cant seem to edit it, if I do I also get an error in itunes that is some hex code...

    Did you ever solve your problem?
    I just transfered my web hosting and e-mail to bluehost. I had some of the same problems you are having. I noticed you have your incoming server set to bluehost.
    Incoming mail server: (SSL) box610.bluehost.com (sever requires authentication which I already have done)
    If bluehost is your server this is what worked for me:
    Account Information
    Account type— POP
    Description—anything you want
    Email Address—in your case would be [email protected]
    Full name—  first and last name
    Incoming server—mail.magnus.com
    User name—[email protected] Notice it is the @ symbol not a +
    password— your password . Remember they are case sensitive
    Outgoing Mail server—select edit smpt server list from the drop down window
    select the + to add a server
    Account Information
    Description—may be left blank
    Server name—mail.magnus.com
    TSL Certificate—None
    Advanced
    Use default ports
    Check  Use SSL
    Authenticate—password
    Username—[email protected]
    passowrd—your password
    Click ok
    In the accounts window
    Outgoing SMTP— select the server you just created.
    Check—use only this server
    Select the Advance tab next to the Mailbox Behaviors
    Check use SSL— it will be port 995
    Authenticate —use password
    Ann

  • Using cookies to remember the last 2 links visited

    Hey everyone,
    I am trying to use learn JSP and cookie. I am making a webpage, and it is suppose to remembers the last 2 links selected from the website.
    Basically, there are a few radio buttons. The user is to pick one, press submit. I am trying to write a cookie to "remember" that action so that the next time that user comes, there should be a link that says these are the last 2 pages visited.
    Having not much JSP experience, I would like some assistance in building this kind of a website. It is very simple (Just a table with 2 columns - left for menu, right for navigation).
    I was wondering if someone could help me with this.
    Thanks in advance.

    Can anyone please give me some code samples how can i do that.And what prevents you from searching the web ?

  • Error setting cookie while login process

    Dear forum users,
    i am getting this error while login into my own application.
    Content-type: text/html; charset=ISO-8859-1 Set-Cookie: DHW_COOKIE=EEDD257F53989F57; path=/; Location: f?p=100:1000:155225166267009
    I am using a process on submit after computation. This process is before the login process.
    10: set Cookie
    20: login
    This source would setting the cookie before login:
    declare
    p_text_raw RAW(128);
    p_key RAW(128) := utl_raw.cast_to_raw('Key88888');
    p_crypto_typ NUMBER := dbms_crypto.des_cbc_pkcs5;
    p_encrypted_raw RAW(2048);
    p_decrypted_raw RAW(2048);
    begin
    -- Benutzername und damit den Cookie-Inhalt verschlüsseln
    p_text_raw := UTL_I18N.STRING_TO_RAW (lower(:P100_USERNAME), 'AL32UTF8');
    p_encrypted_raw := dbms_crypto.encrypt(
    src=> p_text_raw,
    typ => p_crypto_typ,
    key => p_key);
    -- Verschlüsseltes Cookie senden
    owa_util.mime_header('text/html', FALSE);
    owa_cookie.send(
    name=>'DHW_COOKIE',
    value=>p_encrypted_raw);
    owa_util.http_header_close;
    exception
    when others then null;
    end;
    Any ideas for this error ?
    regards
    Frank
    Hello community,
    any comments ?
    Edited by: handwerk.net on Dec 16, 2009 7:31 PM

    Here's one more reason why this error occurs in Toad. It is when you have more than one Oracle Client installed on your machine. Even when you select the correct Oracle Home in "Connect Using" field of Toad, you still get this error "Can't initialize OCI. Error -1". So, to solve that you need to go to the installation folder of that Oracle Home (e.g. C:\Oracle\ora92\), then go to the BIN folder. Open Oracle.Key in Notepad and confirm that it is showing Registry entry/path to the correct Oracle Home (e.g. HOME0 or HOME1 or whatever).
    I hope this helps.

  • XSQL set-cookie

    When I write an XSQL cookie, it won't actually do it until i refresh the login screen, i.e.:
    1) Enter username and password into XHTML page
    2) Post to auth.xsql
    3) auth.xsql reads the username and password and authenticates
    4) all user information for that username and password is pulled out of the database
    5) attempt at writing cookie fails.
    6) when i refresh the page, the cookie then has a value and shows up.
    Why is this? And also, is there any way of deleting the cookie, like with a logout button, using XSQL? Maybe like XSQL:delete-cookie ?
    Thanks!
    Here's the code:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="/dvd/dvd.xsl"?>
    <database connection="dvd" xmlns:xsql="urn:oracle-xsql">
    <xsql:query id-attribute="" tag-case="lower" rowset-element="allusers" row-element="userinfo" bind-params="username password">
    SELECT *
    FROM LKUP_USER
    WHERE USERNAME = ? AND PASSWORD = ? /* AND ACCESSLEVEL = 1 */
    ORDER BY USER_ID
    </xsql:query>
    <xsql:set-cookie name="authuser" only-if-unset="no" ignore-empty-value="yes" bind-params="username password">
    SELECT USERNAME
    FROM LKUP_USER
    WHERE USERNAME = ? AND PASSWORD = ? /* AND ACCESSLEVEL = 1 */
    </xsql:set-cookie>
    <xsql:include-request-params/>
    </database>--
    Malik Graves-Pryor

    This the flat XML result when the page is first loaded:
    <?xml version="1.0" ?>
    - <!-- <?xml-stylesheet type="text/xsl" href="/dvd/dvd.xsl"?>
    -->
    - <database>
    - <allusers>
    - <userinfo>
    <user_id>1</user_id>
    <firstname>Malik</firstname>
    <lastname>Graves-Pryor</lastname>
    <username>malik</username>
    <password>malik</password>
    <email>[email protected]</email>
    <accesslevel>0</accesslevel>
    </userinfo>
    </allusers>
    - <request>
    - <parameters>
    <password>malik</password>
    <username>malik</username>
    </parameters>
    <session />
    <cookies />
    </request>
    </database>and here is what it looks like when I refresh the page, doing nothing else:
    <?xml version="1.0" ?>
    - <!-- <?xml-stylesheet type="text/xsl" href="/dvd/dvd.xsl"?>
    -->
    - <database>
    - <allusers>
    - <userinfo>
    <user_id>1</user_id>
    <firstname>Malik</firstname>
    <lastname>Graves-Pryor</lastname>
    <username>malik</username>
    <password>malik</password>
    <email>[email protected]</email>
    <accesslevel>0</accesslevel>
    </userinfo>
    </allusers>
    - <request>
    - <parameters>
    <password>malik</password>
    <username>malik</username>
    </parameters>
    <session />
    - <cookies>
    <authuser>malik</authuser>
    </cookies>
    </request>
    </database>As you can see, the cookie "authuser" is written, but only after I refresh the page. Any clues to that, and also how to delete the "authuser" cookie later on using XSQL so that one can log out of the app?
    p.s.: Steven, are you going to release an updated "Building Oracle XML Applications" book anytime within the near future, i.e., next 1-3 months?
    Malik Graves-Pryor

  • Whats happening to my set-cookie header?

    I'm writing a desktop client for a Django app running on an https domain.
    I'm attempting to retrieve cookies set by the django site when I call the site using URLRequest as follows:
    var urlVariables = new air.URLVariables();
    urlVariables.foo = "bar"
    var request = new air.URLRequest("https://www.example.com/api/foo/");
    request.data = urlVariables;
    request.method = air.URLRequestMethod.POST;
    var loader = new air.URLLoader();
    loader.addEventListener(air.HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpStatusHandler);
    loader.addEventListener(air.Event.COMPLETE, completeHandler);
    loader.addEventListener(air.IOErrorEvent.IO_ERROR, ioErrorHandler);
    loader.load(request);
    However if I loop over the headers returned by the site like so...
    function httpStatusHandler(event){
        for(var i=0; i<event.responseHeaders.length; i++){
           air.trace(event.responseHeaders[i].name);
    ...I discover that that the Set-Cookies header is conspicuously absent.
    Is this a deliberate security restriction for calls to HTTPS sites? I'm completely baffled.
    Any help appreciated.

    Go into the System Preferences and click on Users & Groups. Try creating a new user account and then log into it to see if you have the same issues. Since your hard drive appears to be fine with plenty of space on it, and you have no major permission's issues, creating a new user for test purposes will help confirm whether you are dealing with some sort of software issue. Did you recently install some new software?
    If a new user account resolves the issue then open the Activity Monitor application located in the Applications/Utiliteis folders and click on the CPU button. In the lower left corner you should see a summary listing the % User, % System, % Idle. What are these percentages? If the CPU idle percentage is near zero then you have a process running that is consuming your SPU time. To try and find it pull down the menu to select 'All Processes', then click on the %CPU column to sort by the percent that each process is consuming your CPU.   The numbers constantly change, but do your best to see if there are one or two processes consuming the majority of the CPU time and post the names. Then do the same test in the new user account. I suspect you may have some process from a previously installed utility, virus checker, etc. that is keeping your system busy. I've included a screenshot from my system below. It doesn't have much going on, and as you can see in the lower left corner the CPU is basically idle most of the time. If I were to launch a CPU intensive app the numbers would change dramatically.

Maybe you are looking for