MDL-15899 JavaScript error In IE7 when opening SCORM content in a new window. Fix spaces in popup name for fussy IE.
This commit is contained in:
@@ -325,7 +325,13 @@
|
||||
|
||||
echo " <iframe id=\"scoframe1\" class=\"scoframe\" name=\"scoframe1\" src=\"{$fullurl}\"></iframe>\n";
|
||||
} else {
|
||||
?>
|
||||
// Clean the name for the window as IE is fussy
|
||||
$name = ereg_replace("[^A-Za-z0-9]", "", $scorm->name);
|
||||
if (!$name) {
|
||||
$name = 'DefaultPlayerWindow';
|
||||
}
|
||||
$name = 'scorm_'.$name;
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
scorm_resize();
|
||||
@@ -350,7 +356,7 @@
|
||||
url = "loadSCO.php?id=<?php echo $cm->id.$scoidpop ?>";
|
||||
width = <?php p($scorm->width) ?>;
|
||||
height = <?php p($scorm->height) ?>;
|
||||
var main = openpopup(url, "<?php p($scorm->name) ?>", "<?php p($scorm->options) ?>", width, height);
|
||||
var main = openpopup(url, "<?php p($name) ?>", "<?php p($scorm->options) ?>", width, height);
|
||||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
|
||||
Reference in New Issue
Block a user