Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3760 มุมมอง

I am trying to plug some of my javascript function for CRM module in openerp. what i want to achieve is -

  • disable right click
  • disable text selection.

Here below is the code of my js function.

 noRightClick = function () {
    document.oncontextmenu = function(){ return false; };
  };

and

noSelect = function () {
    document.onselectstart = function () {
      if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") {
        return false;
      } else {
        return true;
      }
    };

Please suggest where should i place these functions, so that it applicable to only CRM module.

Thanks in advance...

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can find information on how to do that on the web module documentation:

https://doc.openerp.com/trunk/web/module/ https://doc.openerp.com/trunk/training/

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ค. 25
215
2
เม.ย. 25
1145
how to read field values using js แก้ไขแล้ว
1
พ.ค. 25
8178
0
มี.ค. 15
3799
1
มิ.ย. 25
428