logo

New Response

« Return to the blog entry

You are replying to:

  1. A hidden iframe should give you access to the cookie.. Attach an onload-listener to the iframe, and you should be ready to go.

    From my experience, it's simplest to create an iframe using a container-div created by dom, and inserting the iframe using innerHTML. Cross browser event-binding on dom-inserted iframes has given me so much head-ache, I've more or less given up on it.

    Example:

    var ifrContainer = document.createElement( 'div' );

    ifrContainer.innerHTML = '<iframe src="/names.nsf?login" onload="someFunction()"></iframe>';

    document.body.appendChild( ifrContainer );

    function someFunction(){ alert( frames[frames.length-1].document.cookie )}

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: