I have a button that when pressed, it want it to do something based on what is in a couple of fields on the grid.
So the first javascript is to make sure certain fields are not false or empty.
I have tried many, many different configurations but when it works, I continue to get the same results - that is, what was ever last stored (true/false or the text) remains even though I can clearly see the field's value that it should be checking is different than what the alert box is displaying.
Here are a couple of test samples that I have been working with:
I have tried different browsers, different computers, cleaned out my cache, etc.
My back end is MS SQL.
And when do you use " = vs == "? (I even have seen === in the literature??)
It seems to make a difference if I am using a logical bit and if the grid is a check box vs a text field, as well as on how how I use "true" vs "1" or the assumption that a field is true (ei if(var){ . . .)
I want to know:
1) how to make sure that if the value changes and you can see the change in the grid, the button press will reflect that.
2) What syntax do you use in the above examples for checking if a var is true or false? How many equal signs, etc.
I am sure others are confused as well .. . any good resources for using Javascript with Alpha like this?
Thanks - I appreciate any help!
So the first javascript is to make sure certain fields are not false or empty.
I have tried many, many different configurations but when it works, I continue to get the same results - that is, what was ever last stored (true/false or the text) remains even though I can clearly see the field's value that it should be checking is different than what the alert box is displaying.
Here are a couple of test samples that I have been working with:
PHP Code:
var ssep = {grid.Object}.getValue('G','REPORT_READER_SSEP',1);
var fill_emg = {grid.Object}.getValue('G','FILL_EMG',1);
if(ssep==''){
alert('Show this. Fill_EMG= '+fill_emg+' SSEP Comments:'+ssep);
return;
}
if(fill_emg){
alert('Show this. Fill_EMG= '+fill_emg+' SSEP Comments:'+ssep);
return;
}
My back end is MS SQL.
And when do you use " = vs == "? (I even have seen === in the literature??)
It seems to make a difference if I am using a logical bit and if the grid is a check box vs a text field, as well as on how how I use "true" vs "1" or the assumption that a field is true (ei if(var){ . . .)
I want to know:
1) how to make sure that if the value changes and you can see the change in the grid, the button press will reflect that.
2) What syntax do you use in the above examples for checking if a var is true or false? How many equal signs, etc.
I am sure others are confused as well .. . any good resources for using Javascript with Alpha like this?
Thanks - I appreciate any help!
Comment