Nov 21, 2009

Call Cookie Functions In Iframe

free web hosting
Open Discussion > MODERATED AREA > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

Call Cookie Functions In Iframe

kvarnerexpress
I have got a page with an iframe. The iframe contains the cookie functions.

How do I access the cookie functions from the iframe?

When I do the following

<a href="Common.htm" onClick="javascript:window.frames.["FrameData"].CreateCookie('CookieTrackMain','A.htm',7);">Common</a>

I get the error 'Expected identifier'.

What is the solution?

Comment/Reply (w/o sign-up)

cmatcmextra
I don't know what the problem is but I'd just like to say that I think it's a bad idea to call a cookie in an iframe. IE6 and maybe even earlier versions and of different browsers will block cookies in an iframe as they'll see it as a security threat.

Oh well. Just a suggestion.

Comment/Reply (w/o sign-up)

FeedBacker
Replying to electriic ink

This guy is asking a decent question and you have to knock him down a level. Yes it is a security threat, but he doesn't know that. For someone who doesn't know this, where is he suppose to find out? Not here - because some jerk is going to make him look like a dufus. Next time - can you please respond like this:

This is possible because its a security threat. IE6 and maybe even earlier versions and of different browsers will block cookies in an iframe as they'll see it as a security threat.

Thanks,


-reply by Chris

Comment/Reply (w/o sign-up)

(G)ask2gaurav
third party cookies in iframe
Call Cookie Functions In Iframe

Some browsers allow third party cookies and in some browsers, like Internet Explorer, it depends on the privacy
Settings of the browser. In IE6 (Internet Explorer 6) with the default privacy setting of ‘Medium’, third party
Cookies will be deleted.

As it turns out, there is a simple solution. If you supply a ‘compact privacy policy’ with your page, then IE
Will treat the cookies with respect and let them through.

ASP.Net code
   HttpContext.Current.Response.AddHeader("p3p", "CP=\""IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""")

PhP code
 header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

For more information on this, please visit this url:
Http://viralpatel.Net/blogs/2008/12/how-to-set-third-party-cookies-with-iframe.Html
-reply by ask2gaurav

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : call, cookie, functions, iframe

  1. Javascript Help
    Can't do simple variable functions ¬_¬ (1)
  2. A Cookie Question.
    How would I make one-time warning pages? (1)
    I used some code taken from a few basic tutorials on the Internet and thrown together to create a
    rough script that will, hopefully, request one to click a link to enter a website, but once the link
    has been clicked once, a cookie will be created so that page will forward one directly to the next
    page. The following is the code I have in my head tag: CODE cookie_name = "dataCookie";
    function putCookie() { if(document.cookie != document.cookie) {index =
    document.cookie.indexOf(cookie_name);} else { index = -1;} cookie_name = "dataCookie";
    function getNam....
  3. How To Set Cookie With Javascript?
    please... (3)
    The same as topic... I try to learn cookie setting from many scripts but i still don't got it
    /huh.gif" style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" /> . anyone help me,
    please /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> . for
    example this code... /blink.gif" style="vertical-align:middle" emoid=":blink:" border="0"
    alt="blink.gif" /> CODE function get_cookie(Name) { //Get cookie routine by Shelley Powers
     var search = Name + "="  var returnvalue = "";  if (document.cookie.length > 0) {    off....
  4. To Call Functions Of Javascript From A Java Applet
    Please help me. (2)
    Hi.There is a matter to know. I studied how to call the public method of a JAVA applet from
    javascript on the other day.(Within javascript, this is possible, if it carries out like
    document.applets . method ();.) I want to have come to know then suddenly,it is contrary to this,
    Is it possible to call functions of javascript from a JAVA applet? Please tell me this.
    /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />....

    1. Looking for call, cookie, functions, iframe

Searching Video's for call, cookie, functions, iframe
See Also,
advertisement


Call Cookie Functions In Iframe

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com