Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

242
Views
How to call function from script with type=module from outside?

const dbref=ref(db);
    get(child(dbref,"TheStudents")).then((snapshot)=>{
        snapshot.forEach((doc)=>{
          $("#languages").append('<a href="#'+doc.val().Number+'" class="filterDiv '+doc.val().Section+' show" id="'+doc.val().Title+'">' +doc.val().Title+ '</a>'+'<div id="'+doc.val().Number+'" class="modal-window"><div><a href="#" title="Close" class="modal-close">Close</a><h1 id="title">'+doc.val().Title+'</h1><h2 id="author">'+doc.val().Author+'</h2><h3 id="pages">'+doc.val().Pages+'</h3><h3 id="roll">'+doc.val().Number+'</h3> <h3 id="shelf">'+doc.val().shelf+'</h3> <h3 id="borrower">'+doc.val().borrower+'</h3><div id="description">'+doc.val().Description+'</div><br><button id="butt" onclick="borrow(\''+ currentUser.borrowed+'\',\''+ doc.val().borrower+'\',\''+ currentUser.username+'\',\''+ currentUser.fullname+'\',\''+ doc.val().Number+'\')">Borrow</button></div></div>');});
    });

I am a beginner and getting hands ready on web developing. The thing is, I am working with firebase database and i need a function declared inside the outside the script ,and also it should be onclick function. Plz help me with this.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!