Web Analytics Made Easy -
StatCounter javascript, frames and protocol - CodingForum

Announcement

Collapse
No announcement yet.

javascript, frames and protocol

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • javascript, frames and protocol

    Hi,

    Here is what I'm trying to do:

    I have 2 frames on 2 different servers:

    httpS://www.xxx.com/frame1.html
    and
    httpS://www.yyy.com/frame2.html

    I try to retrieve (grab) information from frame2 to frame 1 but I keep receiving the following error message: Access is denied.

    I guess this is because:

    1. the pages are not on the same server
    2. maybe because of the protocol (https).

    now, my question is: is there a solution to that problem, a way around ? in javascript or any other language.

    Please post your ideas.
    Thanks !

  • #2
    Yes it is because the files are on different servers and so it is a security issue, but yes there is a work around with JavaScript.

    You can put you data in the query string of the second frame and reload it. Once the page has reloaded you can retrieve information from the query string and do what you want with it.
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

    Comment


    • #3
      Thank you lavalamp for your kind answer.

      Unfortunately, I don't have access to the second server (the one with the information) so I can't reload the page.

      Comment


      • #4
        If you opened the frame in your page then you can refresh that page, but you don't even need to do that.

        You can simply use:

        second_frame_name.location.href="blah.html?var_a=abc&var_b=def"
        AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
        BFG GeForce 6800 Ultra OC 256Mb
        3 * Kingston 256Mb PC3200 DDR400
        Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

        Comment

        Working...
        X