0

I need your help about a display issue I got using getElementbyId. So, I'm using a function called 'Billing' (located in my component), that supposed to take in param 'billing-info' (my id). In my component, I'm able to retrieve the param (billing-info), then I'm trying to display an html that contain this param (billing-info), but I got this error ' 'document.getElementById(element).style')' The html is not read and not displayed.

Please find below all details, Let me know if you need more info. Thank you in advance, Matt

allBills.view.js

billing: function() {
   billingComponent.alert('billing-info');
} 

billingComponent.js

 alert: function(element) {
    console.log('element', element);
    // 'billing-info' is print here
    let container = document.getElementById("container");
    console.log('container', container);
    document.getElementById(element).style.display = "block";
  },


<div id='billing-info'>
  <h1>All bills goes here</h1>
</div> 

0 Answers0