Wednesday, January 14, 2015

Add a CSS file in Intrexx

As you already know you can directly write your CSS code in intrexx without any issue. But if  you have, say a third-party CSS library or a CSS file that you want to add in intrexx you need to be aware of the following fact:
  1. Put a copy of your CSS file preferably in this directory or any other location:  \org\yourPortalName\external\htmlroot\include\custom\
  2. Open the following CSS file (\org\deinportal\external\htmlroot\include\custom\custom.js) and add the following:  
    Loader.loadCssFilesOnDemand('yourCssFile.css');
  3. Save everything and reload  your application
Enjoy it.

adding jquery plugin in intrexx

As you already know you can directly write your javascript code in intrexx without any issue. But if  you have say a third-party javascript library or a jquery plugin that you want to add in intrexx you need to be aware of the following fact:
  1. Put a copy of your plugin in this directory:  \org\yourPortalName\external\htmlroot\include\custom\
  2. Open the following js file (\org\deinportal\external\htmlroot\include\custom\custom.js) and add the following:  Loader.loadJsFileOnDemand("include/custom/yourScriptName.js");
  3. Save everything and reload  your application
Enjoy it.

Friday, January 2, 2015

jquery NaN error

I have just written a small script today with jquery and come across this small error message.
inital code:

var1 += parseInt($(this).html());
var2 = parseFloat(age);

Solution

    var1 += parseInt( $(this).text(), 10 ) || 0;
  var2 = parseFloat(age) || 0;
 
Hope it helps.