SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast firehawk777's Avatar
    Join Date
    Feb 2011
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How to call a function in an iframe?

    Hi there
    I am wondering if anyone can tell me the best way to access the functions of an Iframe from the parent of the frame.
    I have tried
    Code:
    var myFrame = document.getElementById('gigmap');
    myFrame.flashMouseover(gid);
    and
    Code:
    window.frames['gigmap'].document.flashMouseover(gid);
    though these didn't work.

    In case you are wondering what I am doing is sending an id of a gig in my database when its button rolled over in a flash swf to a Google Map (inside the Iframe 'gigmap) and make the corresponding marker on the map jump. I have it so the iframed map markers send to the flash file on rollover though not the other way round...yet!

  2. #2
    SitePoint Enthusiast firehawk777's Avatar
    Join Date
    Feb 2011
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I may not have explained the problem well enough.
    here is a better explanation of the problem.

    Mainpage function a('number') receives flash variable 'number' then sends variable 'number' to iframe function b()
    The part in red is where I have the problem.


Bookmarks

Posting Permissions

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