Hello,
I am just now exploring JavaScript and events (Exciting for me and my users), and I have started adding functions that change fields depending on selections as they are done instead of running After Save queries.
I have a dropdown box that a user selects Yes, No or Pending with the dropdown field using "|Pending|1|Yes|0|No".
This dropdown has an onchange event on it that changes a date field, which works great.
I also have a display field somewhere else on the form that shows P, Y, N depending on what is saved for the record. I am using this code "select if('#slstoquote#' = '1','Y',if('#slstoquote#' = '0','N','P'))"
I am wondering if there is a JavaScript code that will force an update on the display field so when a user changes the dropdown box, not only does the date field populate, but the display field updates as well.
Love nuBuilder by the way. Except, every time I learn something new that is more efficient, I get to go through and recode/migrate everything...which I suppose is good experience for other projects and also gives me better arguments to rip apart another access database
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Refresh display field
-
- Posts: 54
- Joined: Fri Oct 23, 2015 12:34 am
Re: Refresh display field
Probably not the best way, but since I only had 3 static options in this particular display field, I added
$('#dispQYN').val('N').change();
to my function to get my result to show in the display field onchange of the real field's dropdown.
$('#dispQYN').val('N').change();
to my function to get my result to show in the display field onchange of the real field's dropdown.
-
- Site Admin
- Posts: 2783
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 3 times
Re: Refresh display field
mobilemcclintic,
I'm not sure I understand your question...
If you have a field called invoice_total
you can update it with $('#invoice_total').val(123.45);
(But you knew that).
Steven
I'm not sure I understand your question...
If you have a field called invoice_total
you can update it with $('#invoice_total').val(123.45);
(But you knew that).
Steven