Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

I have java code within my page designer that creates a show...


Ashley Leggore

Recommended Posts

I have java code within my page designer that creates a show/hide feature on a date filter based on whether you select the Report Type to be monthly, daily, or weekly. Currently, on run/page load this

show/hide filter does not work until you click in the filter bar, then the date filter disappears. Im very new to javascript and Im unable to figure out how to add a piece of code that will make this happen at time of page load. Any suggestions

Here is the sample javascript im currently using:

var _checkColumn = REPORTTYPE;

var _checkValue = Monthly;

var _hideObjWithClass = .dateparam;

$(body).on(blur, .ibx-select-item-list-paged-inner, function() {

setTimeout(function() {

var _page = document.querySelector(".pd-page").ibaObject;

var _pageUtil = PageUtil.getPageUtil(_page);

var amperManager = _pageUtil.getAmperManager();

var _filterValues = "";

amperManager._ampers.forEach(function(amper) {

if ( amper.info.name == _checkColumn ) {

_filterValues += amper.info.curValue + "##";

 

}

})

 

console.log( _filterValues )

 

if(_filterValues.indexOf( _checkValue ) > -1) {

$( _hideObjWithClass ).animate({opacity:0},350);

}

else {

$( _hideObjWithClass ).animate({opacity:1},350);

}

 

}, 50);

});

Link to comment
Share on other sites

Thank you MartinY. Im very unfamiliar with java script at all and its very new to me. So, when you say its called by the window_onload function, I dont have any code specifically for that in here like I would see in an HTML designer page. Im using the page designer. So do I need additional code besides what you provided I also tried that code you provided and could not get it to work.
Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...