SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Targeting Flash, Different Frameset

    Hello and thanks in advance.

    I've been attempting to create (with big help from better coders than I) a javascript / flash-actionscript which involves a flash document in one frameset and the javascript in another.

    At first, it only worked in Safari (Mac). A friend helped me to get it working for Safari (Mac), IE (Windows) and Netscape/Firefox (Windows).

    It does NOT, however, work in IE (Mac) or Netscape/Firefox (Mac).

    I'd very much like to have it working in as many browsers as possible, if not universally in all of them (smirk).

    One user suggested that I use the "Flash/JavaScript Integration Kit" and I'd be happy to if I could just get someone to show me HOW.

    I understand the installation well enough, no prob. So, now for my question ...

    Based on the following code, is there an easier or more streamlined way to get the same output in all current browsers, without errors? If not, how would I get the "Flash/JavaScript Integration Kit" to do this?

    My concept is simple but getting to work reliably is troubling

    The code ...

    NOTE: "upper" is the frameset and "navigation" is the flash doc.

    <html>
    <head>
    <script language="JavaScript">
    <!--
    function reSet(target, frameNumber)
    {
    parent.upper.document.navigation.TCallFrame(target, frameNumber);
    }
    //-->
    </script>********
    </head>
    <body bgcolor="#FFFFFF">*
    <form><input type="BUTTON" value="Reset" onclick="reSet('/', 3)"></form>
    </body>
    </html>

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A more standard way of calling that function would be:

    window.parent.frames["upper"].document.getElementById("navigation").TCallFrame(target, frameNumber);

    Assuming that "navigation" is some element defined with id="navigation"

    Without seeing the other page I can't be sure.

    Try that and see how it goes.

  3. #3
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can see why this code makes more sense and yes, "navigation" is referred to via id="navigation".

    Unfortunately, not only does your version not work in the Mac version of IE or Netscape, now it doesn't work in Netscape for PC.

    For code check purposes, you can see my page at http://www.robindean.com/main2.html


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
  •