Set cookie after flash plays

Anyone know how to set a cookie so that if a .swf plays once,
it will not play again unless explicity told to? Or, is there any
other way to have a Flash movie automatically play only once, and
not on every refresh?
Thanks
Rick

Here is a sample I made that uses Flash SharedObjects to
accomplish this.
http://www.smithmediafusion.com/blog/?p=212
Dan Mode
--> Adobe Community Expert
*Flash Helps*
http://www.smithmediafusion.com/blog/?cat=11
*THE online Radio*
http://www.tornadostream.com
*Must Read*
http://www.smithmediafusion.com/blog
"ricking" <[email protected]> wrote in
message
news:enen4q$ghu$[email protected]..
> Anyone know how to set a cookie so that if a .swf plays
once, it will not
> play
> again unless explicity told to? Or, is there any other
way to have a Flash
> movie automatically play only once, and not on every
refresh?
>
> Thanks
> Rick
>

Similar Messages

  • Need to set cookies after https (ldap) authentication

    How can I set cookie on user machine after successful authentication via
    AuthLDAPAuthoritative On
    on Apache 2.0.59
    Thanks
    Seb

    Sebastian,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • * How about flash play 8 Garbage Collector working?

    Hi, I need to add some Image controls dynamically, yes,the
    number of those are unpredictable.
    My code to create them like this:
    quote:
    public function addImg(name:String, x:Number, y:Number):void
    var sm1:Image = new Image();
    sm1.source = "imgs/down_medium.gif";
    sm1.name = name;
    sm1.x = x;
    sm1.y = y;
    this.addChild(sm1);
    Then, it appeared in my application. if I add numbers of
    Image in my stage, they eat my memory crazily.
    so I want to kill some Image which is not in use, but I
    crashed.
    An Image named "img4kill" in stage, it's index in
    this.getChildren() is4, and it holds a image which size is about
    230K.
    I tried to kill it like this:
    quote:
    this.removeChildAt(4);
    yes, it's remove from the stage in faith, but I watched the
    memory that the browser using, before and after killing it.
    I found the memory it takes is not released.
    How can I kill it from both the stage and memory ? I tried
    the global function "delete" ,but failed too.
    I know that flash play 8.5 and later use a powerfull
    GC(garbage collector), but in the sample above, it dose't work for
    me.
    who can save me from this mud layer?any ideas?
    thanks a lot .
    (sorry about my ugly english)
    [email protected]

    Don't worry, the garbage collector will work very well in this case (and in every other case too :) ). It will only collect an object when no more references are pointing to it. Your array still holds a reference to all the items it contains (unless you explicitly do array[index] = null).
    There are only three ways that I know of to destroy a reference to an Object: 1). Set the reference to null 2). Let the reference fall out of scope 3) reassign the reference to another object
    The garbage collector will also be able to collect objects that have a cyclical references as long as none of the objects in the cycle are reachable.
    It pays to understand the ins and outs of garbage collection and memory management in the VM. Knowing that will let you know, for example, that allocating an Object in Java is a very cheap operation (while it is pretty expensive in C/C++).
    Check http://www.ibm.com/developerworks/java/library/j-jtp10283/ and http://www.ibm.com/developerworks/java/library/j-jtp11253/ and for more details about the GC
    Also don't worry about the performance impact of setters and getters, either the javac compiler or the Virtual Machines Just In Time Compiler will inline those small methods.
    In short don't worry about such low level performance problems and concentrate on your coding style and algorithms. The Hotspot JVM is an amazingly efficient piece of software. It also include a lot of optimizations that work very well in optimizing "standard" code. The more normally you code, the faster your program will be, so don't try clever optimizations tricks, they probably won't work well in java.
    Read the following articles for some discussion about performance in Java:
    http://www.ibm.com/developerworks/java/library/j-jtp04223.html
    http://www.ibm.com/developerworks/java/library/j-jtp09275.html
    http://www.ibm.com/developerworks/java/library/j-jtp01274.html

  • How to  get rid of "Content-type: text/html; charset=UTF-8 Set-Cookie..." ?

    Hi
    I have several applications and I am working on making some kind of APEX "SSO".
    An user is authentified in one application. Then he may go to another application. The cookie has the same name from one application to another. The session ID is preserved from one application to another : i use this kind of URL : "f?p=109:1:&SESSION.:"
    I have seen that I need to authentify automatically the user when he swap to another application. For that i have a process in the welcome page that authentify the user, using the :app_user and the password, a PL/SQL after header:
    wwv_flow_custom_auth_std.login(
        P_UNAME       => :APP_USER,
        P_PASSWORD    => :P1_PASSWORD,
        P_SESSION_ID  => v('APP_SESSION'),
        P_FLOW_PAGE   => :APP_ID||':1'
        );So far so good. User is authenticated. The problem I face is that this message appears :
    Content-type: text/html; charset=UTF-8 Set-Cookie: TELEGESTION_AUTH=-1; path=/; Location: /pls/apex/f?p=109:1How to get rid of this message ?
    Thank you for your kind help !
    Christian
    PS: My question has not been answered... I hope somebody could help me on this topic.
    Edited by: Christian from France on Mar 4, 2010 2:02 AM

    Hi
    Have you tried using "f?p=109:1:&APP_SESSION.:" instead of "f?p=109:1:&SESSION.:".
    I don't see why you need to reauthenticate if they're in the same workspace?
    Cheers
    Ben

  • How to close a video after it plays

    Hey people,
    Say you have a video intro that you would like to have dissapear after it plays. Use this code. (place in trigger event)
    var vid = sym.$("bird_holder");
    vid.html('<video width="1022" height="575" id="bird" src="video/Intro_Animation.mp4" controls="controls" type="video/mp4" </video>');
    $(document).ready(function(){  
           $("#bird").bind('ended', function(){
           sym.getComposition().getStage().getSymbol("intro_animation").deleteSymbol();
    A couple things to address:
    1) My video is housed in a symbol called "intro_animation" which contains the holder for the video. (called "bird_holder" in my example)
    2) If your video is on the main stage, just use sym.getSymbol("holder_name").deleteSymbol(); at the end of your function.
    3) be sure to include id="" in your video tag. and make sure your ready function is referencing that id.
    Hope this helps someone.
    -Dylan

    Hi Marco Antonio,
    I have similar scenario and would like to apply the first option provided by you.
    May I know where is the setting to decrease the PO qty to the total GR qty received?
    I have tried but system give me an error message no. 06230.
    Please help. thanks
    Regards,
    Julia

  • Question about setting cookies and custom authentication

    I have a question about setting cookies.
    I have two different 'projects' in HTMLDB - we will call them App1 and App2.
    I also have two different connection configurations setup in the DADs.conf file. - we will call them Connect1 and Connect2.
    App1 is setup to use database authentication (no user is specified in the DAD) and uses Connect1. Once the user successfully logs in, we set a username cookie (this is a persistent connection).
    We created a custom authenticatoin scheme for App2 - this scheme checks for the username cookie (set by App1). We would like for App2 to use Connect2 (HTMLDB_PUBLIC_USER is the default user specified and it uses connection pooling).
    Is it possible to set a cookie from App1, Connect1 for App2, Connect2 - then redirect to App2 and pick up that cookie?
    Here is an example of what we are trying to accomplish:
    A user loggs into App1, we set a cookie, and the user is redirected to App2. If the cookie exists, we allow them access to the home page in App2, if no cookie, we redirect back to a 'Login Failed' page in App1. We don't want App2 to use the same database connection as App1 though, we need App2 to use connection pooling.
    Is this possible? OR...Is there a better way to accomplish what we want to do?
    This is an enhancement to an existing app. Our requirements are to use Database Authentication (setup where pass expires after 60 days or so, cannot reuse last 3 passwords, etc.) - which is already setup and being used by other applications in our organization. All of our users have accounts in the database. We don't want users to have a new username/pass - and we don't want to manage a separate group for HTMLDB apps.
    The existing application uses HTMLDB's built in authentication - which uses database username/pass, and it uses connection pooling, but we cannot handle the pass expire stuff in it, unless there's something we're not seeing or understanding - at least that's how our DBA explained it to us.
    Any help with this will be appreciated so much. I can send you the code we have if needed.
    Thanks!

    Same problem here.  I have so many problems with this remote app.  Is there an iTunes API? I would like to write my own remote app that actually works.

  • 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

  • Flash plays in Chrome, wont load in IE, like its not even on page.  Code inside please help a newb..

    Here is the code, flash plays fine in chrome even after publishing and making live on web.  But anyone with IE gets all my page but no flash menus or anything.  Have not tried FF.  Please help Im going nuts on this one.  Im using Visual Studio 2010 RC.  This is my first attempt and page is great in chrome.
    <%@ master language="C#" autoeventwireup="true" inherits="MasterPage, App_Web_zu1uh2td" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title>dreamtemplates</title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
    <link href="style.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <script type="text/javascript">
        AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0', 'width', '780', 'height', '327', 'src', '3439', 'quality', 'high', 'pluginspage', 'http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash', 'movie', '3439'); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="780" height="327">
      <param name="movie" value="3439.swf" />
      <param name="quality" value="high" />
      <embed src="3439.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="780" height="327"></embed>
    </object>
    </noscript>
        <asp:ContentPlaceHolder id="head" runat="server">
        </asp:ContentPlaceHolder>
    </head>
        <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
        <form id="form1" runat="server">
        <div>
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </div>
        </form>
        <table width="780" border="0" cellspacing="0" cellpadding="10">
      <tr>
        <td align="center" bgcolor="#181818">Copyright © Company name. 2008 | <a href="#" class="orange-text-regular">privacy policy</a></td>
      </tr>
    </table>
    </body>
    </html>

    Hiya, Mike,
    It's pretty tough to work through pasted-in code. If you can, please upload a page to a server, so we can see your pages in context. We'll be able to download it and look at it.
    That said, you can do this: Find the beginning of an editable region in Code View. It will look like this:
    <!-- InstanceBeginEditable name="nameofregionhere" -->
    Click anywhere in that tag, between the opening bracket and the closing bracket.
    Then, on the vertical toolbar on the left side of the Code window, click on the "Collapse Full Tag" button. It is the one with two arrows pointing at each other. This will collapse that entire editable region. Then click the button with the two arrows pointing away from each other. That will re-open the editable region, but will highlight it.
    If you have nested regions, you will find the other inside one of the editable regions. If you copy the <!-- InstanceBeginEditable and do a search on it in that document, you will find the nested region.
    Beth

  • Losing internet connection after Flash Player update.

    Recently, I suffered from a Fake Flash Player infection involving the Adobooaan hijacker malware.  I had great difficulty getting rid of it and in the end resorted to using Spyhunter and then hand-deleting the things it came up with.
    [Yes, I know Spyhunter is semi-malware itself, eats cpu space and and keeps popping up every half hour demanding payment, but I have it on a leash.  I used AVG PC Tuner to set Spyhunter so it runs only when specifically told to, and then switches off when I've finished with it.]
    Using Spyhunter in this way got rid of the Fake Flash Player hijacker when MalwareBytes, Spybot and Adware-Removal-Tool had all failed, but one of the side effects was that I had to re-nstall, or at least partially re-install, the real Flash Player.  Now, I keep losing my internet connection, and it appears to be happening when I get a "The Adobe Flash Player Update Service service entered the stopped state." system event.
    The outage affects all browsers, and only access to web pages online.  I can still get emails, and open web-pages which are on my own PC, but I lose access to all online pages.  The only cure for it seems to be to re-boot my router by switching it off for a minute, yet my PC's connection to the router seems to be sound, and my ISP's tech team say the router looks fine from their end.
    Spyhunter is a bit over-enthusiastic - it identified a legitimate TextBridge file as a malware of the same name, e.g., so I'm wondering whether in removing the Fake Flash Player infection I've accidentally deleted some legitimate Adobe Flash Player file or cookie, causing Flash Player to switch off my internet connection at the end of every update check.  But if so, how do I fix it?  Is there some way of getting into Flash Player to set options?  It doiesn't seem to have an icon or to appear in the programs list as something you can get at and twiddle with.

    Yep, I've got the exact same problem. I'm using a PowerMac G4, running 10.4.5 (I think). I can't say the problem started happening, since I just started using the sleep function (computer generates a lot of heat in my apartment in the summertime!).
    But yea, I sleep it using the HW button, and bring it back, and no internet connection. I'm not sure if it's the computer (SW caused) or the ISP (disconnects if the computer doesn't respond to pinging). I am using Comcast cable Internet, which is DHCP me thinks.

  • Flash plays the ad video, but cannot make the switch to the main video.

    Flash plays the advertisement video that runs prior to the main video, but then always displays "We're sorry, an unexpected error has occurred. Please try again or select a different video." when it should automatically switch to playing the main video - IE8 has no problem seamlessly switching from playing the ad video to playing the main video. This is a consistent problem across various websites with ads playing before videos.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Set Cookies in a Webbrowser control

    Hi All,
    I have a problem regarding webbrowser control in windows phone 8. I have a Native Login page in the app where we login user through service. In response of the login service we get a token.
    Now I have a page with WebBrowser control.In web browser control we open a url which has login page and dashboard. As the user is already logged in and we have the token. So we need to navigate user directly to dashboard instead of the login page.
    To do this in webbrowser control we need to set Cookies in control. How can we do this task?
    Please help me as we need to close this issue asap. Thanking you in advance.

    I have a very similar authentication flow in my app.  Using native calls (HttpClient) I am able to retrieve the authentication token, and can easily set a cookie with that token, and use the cookie with subsequent
    native calls via HttpClient.
    I believe that what you are asking for is the ability to add that cookie (with the token you got natively) into the webbrowser control's cookie store
    BEFORE trying to load your dashboard page.  You want your webbrowser control's request for the dashboard page to provide the cookie so that the user doesn't have to log
    in again, and only one webbrowser request is made.  Is this correct? 
    Sadly, I do not think this is possible.  The other answers describe how to add a cookie to a webbrowser control's page after that page has been loaded.  This is adding the cookie to the "document" within the browser control, not
    into the webbrowser control's store.  These approaches will not allow you to add the cookie into the webbrowser control's store, ahead of time, so that it will be sent when you first request the page. 
    If I am correct about what you are asking for (I want this too!) it is not supported on Windows Phone as you cannot write directly to the webbrowser control's cookie store.  You can read it, but not write to it.  It's sad as this particular
    authentication flow is very common, and easy to achieve on both iOS and Android... just not on Windows Phone.
    To get around this in my app, I perform my native authentication (HttpClient) and then authenticate
    again within the webbrowser control itself.  Basically, load the login page into the browser, then submit the login form via eval of JavaScript, and when that finishes loading (valid
    response), load the actual target page.  This is a fragile and inefficient hack, but it seems to work. 
    Hope this helps...

  • Where can i find simple flash play/stop button tutorial

    Can anyone help me where can i find simple flash play/stop
    button tutorial. All i need to import a icon play/stop button, when
    click it load wav file.
    How can i attach media.fla
    when u click btn
    on(release) {
    CodePlayer.start();
    on(release) {
    CodePlayer.stop();
    action script
    CodePlayer = new Sound();
    CodePlayer.loadSound("ContactUs.wav",true);

    OK your sorta close. the .wav file "ContactUs.wav" couldn't
    be too large a file, and you can't use 'loadSound' with a .wav, it
    would need to be an mp3 file and you also have it set to be a
    streaming file, which I would image is not necessary.
    So under File>>import select the wav file and add it to
    the Library. Select it, right click, and select 'linkage'. Enter a
    name for the identifier like 'contact_id' and hit OK. Now go back
    to your code on frame one, main timeline and change the code you
    have to:
    var CodePlayer:Sound = new Sound();
    CodePlayer.attachSound("contact_id");
    Now in your button handlers change to:
    on(release) {
    _parent.CodePlayer.start();
    on(release) {
    _parent.CodePlayer.stop();
    }

  • Why cannot I set Cookie on OAS?

    I'm using Jdeveloper3.0 and OAS4.0.8,and I make a Servlet to set cookie.The program runs perfectly in Jdeveloper,but failed on OAS.The codes are as below:
    Servlet1:
    Cookie cook=new Cookie("TestCookie","test");
    response.addCookie(cook);
    response.setContentType("text/html");
    Servlet2:
    Cookie[] cooks=request.getCookies();
    And cooks get null.However,if I use request.getHeader("Cookie"),I can get a String which contains "TestCookie=test".
    Would someone please help me?Thanks a lot.

    Sill question, but have you made sure that the path structure you are using matches the package structure for your application?
    Copying HelloWorld.class into "Folder" should not work unless the base directory is also set to "Folder". (I say this because you've indicated that the two HelloWorlds" are the same). Remember that the full name of your initial class is <package>.<className>. If this doesn't match your initclass setting then the VM will be unable to load your class.
    In general there is no particular reason why your initial class has to be at the root of the DMCC, although it is possible that the devive you are using to play out your AIT has some additional restrictions about what can be done.
    Roger

  • Set cookie in Webview in Windows Phone 8.0

    The app we created runs as a webview control after initial login process. We have to send a cookie(secure httponly ) to server as part of request after first time login for consequent logins.
    There is no solution provided to set cookie in web view. Can anybody share a sample to set cookie in webview control in Windows phone 8.0 (Silverlight app)?

    Hi Santhiyaraman,
    Webview control is in windows phone 8.1 runtime app, in windows phone 8 is webbrowser control.
    Webbrowser control does not provide some properties or methods to add custom cookie, but we can do this using the javascript. Code snippet looks like the following.
    private void setCookie(string name, string value, string path = "", string domain = "", bool isSecure=false, string expires = "")
    var sb = new StringBuilder();
    sb.AppendFormat("document.cookie = '{0}=\" + escape(\"{1}\")", name, value);
    if (!String.IsNullOrEmpty(expires))
    sb.AppendFormat(";expires=\"{0}\"", expires); // should be a GMTString
    if (!String.IsNullOrEmpty(path))
    sb.AppendFormat(";path=\"{0}\"", path);
    if (!String.IsNullOrEmpty(domain))
    sb.AppendFormat(";domain=\"{0}\"", domain);
    if (isSecure)
    sb.Append(";secure'");
    var cookieJs = sb.ToString();
    Debug.WriteLine(cookieJs);
    webBrowser.InvokeScript(cookieJs);
    You can find more information about it from
    http://stackoverflow.com/questions/13287409/windows-phone-webbrowser-set-cookies.
    Please try and let me know the result.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Table Control[Accept Input Only] - "ENTER" Key

    Hi Folks, I'm reviving this unanswered thread in relation to table control: when the user press enter, all the values entered disappear. [url]Re: Table control (Enter key)[url] I have a table control that accepts "ONLY" input, meaning to say, there w

  • Keynote and Microsoft Powerpoint crash when opening a downloaded ppt.

    Hello, I am having a problem that only is affecting my Macbook Pro. both Microsoft Powerpoint and Keynote crashes when I open a ppt. I download from a work site. Same thing happens when trying to open the same file with Microsoft powerpoint.These sam

  • My iCloud doesn't want to sign in?

    I have the correct information but it just keeps loading and loading and loading for ages! And it still won't sign me in. How do I get it to work?

  • J2EE 13 : what kind of application server?

    Hi, I m using j2ee 1.3 but i m wondering what kind of application server does it use it? I asume it is the j2ee application server... Is there a plugin for eclipse that works with this AS(application server); I ve installed Lomboz but AS JBoss is sup

  • Oracle Text and filters

    Hello everybody, here is my question: we have a system and we want users to be able to load documents in the database(upload them, they will be stored in BLOB field of a table), to make full text search on them( I think we should use INSO_FILTER for