I have a custom mashlet that opens a second mashlet passing parameters entered by the user in the initial mashlet but cannot get these parameters in the ema.load statement. I have tested the loading of the mashlet on its own and it works correctly aswell as entering the parameters manually within the "args" of the ema.load and this too works correctly.
The full script used is attached. The code below shows what is executed once the searchBtn has been clicked, I am trying to get the values of inputs "searchidbox" and "searchdatebox" into the args of "sID" and "ivDate" within Ema.load
Hi,
I have a custom mashlet that opens a second mashlet passing parameters entered by the user in the initial mashlet but cannot get these parameters in the ema.load statement. I have tested the loading of the mashlet on its own and it works correctly aswell as entering the parameters manually within the "args" of the ema.load and this too works correctly.
The full script used is attached. The code below shows what is executed once the searchBtn has been clicked, I am trying to get the values of inputs "searchidbox" and "searchdatebox" into the args of "sID" and "ivDate" within Ema.load
Event.observe($('searchBtn'), 'click', function() {
this.search1Txt = $('searchidbox').value;
this.search2Txt = $('searchdatebox').value;
Ema.load({
serverUrl: "http://localhost:8080",
el: "mtarget",
name: "Insurance.Investigation.Mashlet",
args: {
sID: + this.search1Txt, ivDate: + this.search2Txt
},
callback: {
onSuccess: function(mashlet){
console.log('mashlet loaded', mashlet);
},
onFailure: function(err){
console.log('Error loading mashlet', err);
},
scope: this
}
});