[CLOSED] Show _FOC_NULL value when the edit box is blank
I am trying to show _FOC_NULL value when the edit box is blank. I put the below code on onclick button. it works when i click the button twice. i appreciate your help, if i am missing anything in the below code.
//Begin function button1_onclick
function button1_onclick(event) {
var eventObject = event ? event : window.event;
var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement;
var mystring = document.getElementById('edit1').value;
if(!mystring.match(/\S/)) {
document.getElementById('edit1').value = '_FOC_NULL' ;
document.getElementById('combobox1').value = '_FOC_NULL' ;
}
else {
return true; }
}
//End function button1_onclick
This message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8 Windows, All Outputs
February 27, 2020, 06:52 PM
FP Mod Chuck
v_ani
I am a bit confused by this post, _FOC_NULL will never have a value hence the word NULL..
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats