contao/import — Issue #2334: mediabox.js not properly compressed and makes random errors in IE browsers
Author: importer
Created: 2011-11-29 19:24:06+00:00
State: open
Labels: Defect, Invalid, plugins

mediabox.js is not properly compressed and makes random errors in IE browsers like --'S' is null or not an object--
I have recompressed the mediabox_src.js with Dean Edwards packer and everything is ok than

http://dean.edwards.name/packer/

with options:
Base62 encode - ON
Shrink variables - ON

Reproducing this error is a bit tricky:
this are two functions in <'header'> section of fe_page.tpl

```
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload

![](= 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}

function openMediaboxThanYouForm() {
Mediabox.open('#mb_openMediaboxThanYouForm', '', '300 100');
}

```

and this is in form.tpl template at the bottom just before last closing <'/div'>

```
frontend_ThanYouForm )= ''): ?>

```

after a form is submited it just gives some msg in modal window
I know it's not great solution but it was a requirement

[Download the attachments](http://www.contao.org/tl_files/tickets/2334.zip "Download the attachments of this ticket")

--- _Originally created by davor on July 22nd, 2010, at 12:18pm (ID 2334)_