I’m trying to load a page into a modal window. I’d prefer to load with it the necessary js files rather than call them in the head where they will be loaded for every page including the ones they aren’t needed on.
The problem is I can’t get the scripts to load. It seems like something is preventing them from working. I’ve set evalScripts to false and changed the loadMethod to xhr as the docs say the evalScripts option is an option of xhr. Note: it didn’t work before I changed to xhr and evalScripts: false.
Here is the call:
MUI.newthingWindow = function() {
new MUI.Modal({
id: 'newthing',
title: 'New Thing',
contentURL: '/things/newThing/1',
type: 'modal',
loadMethod: 'xhr',
evalScripts: false,
width: 600,
height: 600,
padding: { top: 43, right: 12, bottom: 10, left: 12 },
scrollbars: false
});
};
if ($('newThingLink')) {
$('newThingLink').addEvent('click', function(e){
new Event(e).stop();
MUI.newthingWindow();
});
}
Any clues?
Tanks
needs to be
to allow scripts on the page to work, but still no dice on loading external scripts via
script src. Though, this will allow for a js loader (using jQuery btw “jq”).