SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2002
    0 Post(s)
    0 Thread(s)

    Handling JavaScript across 2 Domains


    I am working on this web site with some of the pages at a different domain name. It is actually one web site, but some of the pages are at a different domain name (different root, too) although the IP address is the same.

    Basically, there is one main window, and a pop-up window. They need to "talk" to each other - mainly access properties to see what page they are on.

    As, the web site is on two domain names, there is a security problem when the pop-up window tries to read properties in the main window, or vice versa.

    Is there anyway to share information between the two? Or is it hopeless?

    On top of that, if anyone knows of a way to share a cookie across a domain-name (same web site, same problem) that would be graet too.


  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Dallas, TX
    0 Post(s)
    0 Thread(s)
    I've seen some stuff before about sharing cookies, but no javascript methods, it was all ASP.

    about the domain thing, I'm afraid browser-based security measures will negate your every attempt.

    Perhaps you can setup a virtual host for the 2nd site. Something like this... << park this to

    That way, anything that you can accsess at can also be accessed at, which now shares the primary domain name with which should get you going
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts