Custom css button in a Form not working with onButtonClick event


#1

Hello,

I’m fairly new to js.
I’ve done a custom css for a button in a form and attached it with a className and now it does not respond to the onButtonClick event.
How can I access the events of the button?


#2

Could you please, provide a code snippet with your using code for the initialization


#5

http://snippet.dhtmlx.com/5/c4b3d9d86

I need button with name “exhange” to work with the function “onButtonClick” just like button “exchange2” works


#6

Hi,

the issue seems to be caused by overriding button content via css content property,
you can check how it works if I comment-out the comment style:
http://snippet.dhtmlx.com/5/4c0aa88bd

Here are working styles:

http://snippet.dhtmlx.com/5/f4cbcbcd2

   .customBtn{
     position:relative;
     top: 244px;
   }
   .dhxform_obj_material .customBtn div.dhxform_btn, 
   .dhxform_obj_material .customBtn div.dhxform_btn div.dhxform_btn_filler{
   	  background-color:#cbefff;
   }
   
   .dhxform_obj_material .customBtn div.dhxform_btn{
       height: 20px;
       border-radius:0.15em;
       box-shadow:inset 0 -0.6em 0 -0.35em rgba(0,0,0,0.17);
   }