Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

onJavaScript confusion

Nial
Pepper Developer
Posted on Aug 01, '08 at 12:32 pm

I’m having a little trouble with my script.js.

Here’s my onJavaScript method:

function onJavaScript()  {

$js = MINT_ROOT.'pepper/perforatedart/airmail/script.js';
if ( file_exists($js) ) include($js);

}

Here’s my script.js (hollowed out):

if (!Mint.PA) { Mint.PA = new Object(); }
Mint.PA.AirMail = {
    deleteSnapshots : function() {
    }
};

Firebug tells me that PA is not defined, and from a bit of debugging it doesn’t look like the onJavaScript method is being called. Am I missing something, here?

Till
Pepper Developer
Posted on Aug 03, '08 at 07:00 am

Request /mint/?js and look for your js-code.

You must be logged in to reply. Login above or create an account