dblclick SelectionInput card script services - google-apps-script

Double clicking a selection input checkbox only triggers the "setOnChangeAction('functionName')" once but it will update the card UI checkbox appropriately; If the box is checked and then it is double clicked the box will visually appear checked but will only trigger the action function once so the back end doesn't match the cards state. Is there a trick to fix this? Thanks.

Related

Is there any way to override a mailto field with another field?

AKA, if I have two fields (one radio button group and one textarea that only appears if the "other" radio button is pressed) how would I make it so the input from the text area overrides the "other" button having it's value placed in the mailto?
E.g., I want this to happen:
field1=text from text area
NOT this:
field1=other
field2=text from text area
Could I set the value of the "other" radio button in field1 to the text coming from the text area?
Alternatively, could I do anything to prevent a certain field from appearing in the mailto fields?
In future, please ensure you present SO with a code issue, not a general question or request. However, you would use a JQuery change handler, like so:
$('#mastertextboxid').on('input', function(){ //executes every time master's text is updated
$('#slavetextboxid').value($('#mastertextboxid').text()); //updates the values
})
This will overwrite any text in the slave textbox when the master textbox is changed, but the User will still be able to input into the slave textbox. It's known as One way data binding.

How to disable buttons on the selected value of the other in AngularJs

I have two buttons - Company Email and Non Company Email.
If i select the first , ng-click="flag='Y'" and the second one renders the flag value as 'N'
So now I am trying to disable them when they are selected so user is not allowed to click on the second time, the second click is creating some UI issues which I want to avoid here.
But the ng-disabled is not working at all as expected, it disables from the outlook but we can still click the button and it behaves strangely.
Pleas help-
Code block is added in comments
This seems like a simple enough issue where you would disabled the buttons using a scope variable set once a button is clicked.
<button ng-disabled="flag=='Y'" ng-click="doCompany()">Company Email</button>
Here is an example

MS Access cursor location in continuous form

I have a contunuous form where editing is disabled. If you want to edit an entry you have to select the line in a table and click the button "Edit".
The problem is when the form loads it's allways the first line of the table that is selected by default and if you click the "Edit" button a from will open with values from the first line of the main form.
What I want is the cursor to be set to nowhere when the form opens and if you click the "edit" button a message box would appear saying that no record is selected. How can this be done?
Put a header on the form, and put a textbox in the header that has the form's name or something. In the Load event of the form, set the focus to the textbox in the header. Something like:
Me!txtMyTextBox.SetFocus
That should get the focus off your continuous form.

Controlling tabbing in form inputs

is it possible to skip the url field when tab button is pressed in a form?
like after it goes to the last input element i wanted it to go back to the first input element instead of going to the url field!
thanks a alot.
You can add an onkeyup on your last input and check if the tab-key was pressed and then run something like your_first_input.focus(), so that it jumps to the first input.

How to make 1st item of html drop down box (select element) selectable

I have a standard html drop down box.
I want to run js code after the user selected an item without a separate submit button.
Onchange event does not fire when the user selects the 1st item (actually the previously selected item) in the select box.
How can I make the combo box react to the click even if the previously selected item is clicked?
Notes:
1. I don't want to add 'select from here' or something similar to the select box.
2. the onclick event does not help since it fires also on the 1st click the user does to open the options before actually selecting one.
I don't think this can't be done. onchange, as you correctly point out, doesn't work. onmouseup fires too early.
I think onblur would do the trick but it will also fire when the user tabs through the available elements.
If you really need this to work reliably, consider using a JavaScript based replacement widget like this one. They enable you to work around the notorious lack of flexibility that standard form elements unfortunately have.
Oh and by the way, the <select> element is not a combo box, it's a drop-down.
:)
You can use the onclick event but at the same time count the number of clicks.
<script type="text/javascript">
var count = 0;
function selectClicked(sel){
count++;
if (count == 2){
//the user has selected something
//so go ahead and handle it
count = 0;
}
}
</script>
What if you added the "onclick" event to the individual "option" elements rather than the "select" element?