Changeset 2260

Show
Ignore:
Timestamp:
2008-07-22 12:21:09 (6 months ago)
Author:
martinkou
Message:

Fixed JavaScript errors when the Flash sample is loaded in IE7.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/branches/features/new_samples/_samples/html/sample16.html

    r2257 r2260  
    3434{ 
    3535        var html = FCKeditorAPI.GetInstance( 'FCKeditor1' ).GetData() ; 
    36         var flash = document.getElementById( 'fckFlash' ); 
    37         flash.setData( html ); 
     36        var flash = document.getElementById( 'fckFlash' ) ; 
     37        flash.setData( html ) ; 
     38} 
     39 
     40function init() 
     41{ 
     42        var so = new SWFObject("sample16.swf", "fckFlash", "550", "400", "8", "#ffffff") ; 
     43        so.write("fckFlashContainer") ; 
    3844} 
    3945        </script> 
    4046</head> 
    41 <body> 
     47<body onload="init();"> 
    4248        <h1> 
    4349                FCKeditor - JavaScript - Sample 16 
     
    4955        </div> 
    5056        <hr /> 
    51         <form target="_blank" action=""> 
    52                 <table width="100%" cellpadding="0" cellspacing="0"> 
    53                         <tr> 
    54                                 <td style="width: 100%"> 
    55                                         <script type="text/javascript"> 
     57        <table width="100%" cellpadding="0" cellspacing="0"> 
     58                <tr> 
     59                        <td style="width: 100%"> 
     60                                <script type="text/javascript"> 
     61<!-- 
    5662if ( document.location.protocol == 'file:' ) 
    5763        alert( 'Warning: This samples does not work when loaded from local filesystem due to security restrictions implemented in Flash.' 
    5864                        + '\n\nPlease load the sample from a web server instead.') ; 
    59 <!-- 
    6065// Automatically calculates the editor base path based on the _samples directory. 
    6166// This is usefull only for these samples. A real application should use something like this: 
     
    7580oFCKeditor.Create() ; 
    7681//--> 
    77                                         </script> 
    78                                         <input type="button" value="Send to Flash" onclick="sendToFlash();" /> 
    79                                 </td> 
    80                                 <td id="fckFlashContainer" valign="top" style="padding-left: 15px"> 
    81                                 </td> 
    82                         </tr> 
    83                 </table> 
    84         </form> 
    85         <script type="text/javascript"> 
    86                 var so = new SWFObject("sample16.swf", "fckFlash", "550", "400", "8", "#ffffff"); 
    87                 so.write("fckFlashContainer"); 
    88         </script> 
     82                                </script> 
     83                                <input type="button" value="Send to Flash" onclick="sendToFlash();" /> 
     84                        </td> 
     85                        <td valign="top" style="padding-left: 15px" id="fckFlashContainer"> 
     86                        </td> 
     87                </tr> 
     88        </table> 
    8989</body> 
    9090</html>