Frappe javascript on click not working

How to generate pdf on button click

1 Like

thanks for the fast replay

but i wrote below code on my js file

this.wrapper.find(“#download”).click(function() {



then i clicked has id = download

nothing shows on console of chrome

may be wrapper not contain ‘#download’ element. plese check output for

1 Like

i tried but again nothing in console


Can you share the full code. Also if you have added the custom button on document then you can use the following syntax for button click event.

frappe.ui.form.on(“Your DocType”, “button_fieldname”, function(){
// your code


1 Like

@makarand_b i droped the idea but thanks for your replay

may be it will help me in some other situation