I want to Prevent or Disable ONBLUR event from Textbox1 by using Javascript at ONFOCUS from Textbox2 in Rich Display file,
Do you have any function to disable ONBLUR Event ?
Thanks in Advance,
Apimook
Developer
Prevent or Disable ONBLUR event
-
- New User
- Posts: 8
- Joined: Mon Sep 23, 2019 5:56 am
- First Name: Apimook
- Last Name: Siriploypraguy
- Company Name: Krungsri Auto PCL.
- Phone: 0806043021
- Address 1: 412 Prachautit Bangkok Thailand
- City: Bangkok
- State / Province: Outside Canada/USA
- Zip / Postal Code: 10140
- Country: Thailand
- Contact:
- matt.denninghoff
- Profound Logic Staff Member
- Posts: 115
- Joined: Wed Feb 10, 2016 3:53 pm
- First Name: Matthew
- Last Name: Denninghoff
- Company Name: Profound Logic Software
- State / Province: Ohio
- Country: United States
- Contact:
Re: Prevent or Disable ONBLUR event
It is not possible to prevent events from firing; the browser will always trigger them. And there is no simple way to detach an event handler from a widget like how you described.
If you have code that runs in the Profound UI "onblur" event that you would want to disable sometimes and not other times, I would recommend having that "onblur" code check a global boolean variable before running. You could set that variable in your "onfocus" event.
e.g. in onfocus:
and in onblur:
If you have code that runs in the Profound UI "onblur" event that you would want to disable sometimes and not other times, I would recommend having that "onblur" code check a global boolean variable before running. You could set that variable in your "onfocus" event.
e.g. in onfocus:
Code: Select all
window.mydisableOnblur = true;
Code: Select all
if (!window.mydisableOnblur){
//do something
}
window.mydisableOnblur = false;
-
- New User
- Posts: 8
- Joined: Mon Sep 23, 2019 5:56 am
- First Name: Apimook
- Last Name: Siriploypraguy
- Company Name: Krungsri Auto PCL.
- Phone: 0806043021
- Address 1: 412 Prachautit Bangkok Thailand
- City: Bangkok
- State / Province: Outside Canada/USA
- Zip / Postal Code: 10140
- Country: Thailand
- Contact:
Re: Prevent or Disable ONBLUR event
Thank you Mr.Matthew , Your Information are very useful, Thanks ^^
Who is online
Users browsing this forum: No registered users and 1 guest