View Single Post
  #9 (permalink)  
Old February 16th, 2005, 04:00 PM
pallone pallone is offline
Friend of Wrox
Points: 1,243, Level: 13
Points: 1,243, Level: 13 Points: 1,243, Level: 13 Points: 1,243, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2003
Location: , , United Kingdom.
Posts: 290
Thanks: 24
Thanked 0 Times in 0 Posts
Default

Hi Joe,

I have made the changes you suggested but it still doesn't work. I get more or less the same message but without the document:

"oFrame is null or not an object"

I really cannot figure out what is wrong. I am pasting the revised code for you to see what I have changed and would appreciate if you could help to spot what is wrong.

Do you think the way I am building the iframe is right ???? I have not used iframe before and was wondering if there is something wrong with it??

Cheers,

Claudio

<html>
<head>
<title></title>


<script type="text/javascript">
<!--

    var sFlashUrl = "dynamicclasses.aspx";
    var sGetFlashUr = "http://www.macromedia.com/getFlash.htm"
    debugger;
    //var oFrame = window.frames["flash"];
    var oFrame = document.getElementById("flash");
    if (hasFlash())
    {
        oFrame.src = sFlashUrl;
    }
    else
    {
        oFrame.src = sGetFlashUrl;
    }

    function hasFlash(Version)
    {
        var sVersion = (Version ? "." + Version : "");
        try
        {
            var oFlash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash" + sVersion);
            oFlash = null;
        }
        catch(e)
        {
            return false;
        }
        return true;
    }

-->
</script>


</head>
<body>
<div>
    <iframe id="flash" src="" width=100% height=50%></iframe>
</div>


</body>
</html>


Reply With Quote