Tuesday 30 May 2017

How to call a javascript function in a js file inside jade file

I have a two files called sample.jade and another file called insertToEnrolledSubjects.js file,(and I'm using nodejs with express framework and for db i'm using mongo db)

sample.jade file displays a table with course details. By clicking Enroll, edit ,delete button in each row of the table students can enroll for courses,edit course or delete it. So there when i click Enroll button it shows a pop up message asking about confirmation when user clicks "ok" button i need to call "insertToEnrolledSubjects" function in insertToEnrolledSubjects.js file how can i do that? Please can anyone give me a better solution i tried a lot but i didn't get any result.



via mad_ss

No comments:

Post a Comment