On 10/15/16 11:47 AM, Joel Anderson wrote:

I'm trying to update some text fields in some online accounting software. I can change the textbox using jquery and .value however when I click the save button it is like I never changed the field. I'm wondering if there is something else I should be doing or some other attribute other than .value I should be using instead.

var employer = 10.0;
$('#payslip > div:nth-child(2) > div > div:nth-child(5) > div.xb-igrid-body > div.xb-igrid-data > div > div.xb-igrid-col.xb-igrid-col5 > input')[0].value = employer.toFixed(2);

Note the source textbox I am targetting looks like this:

<input type="text" class="form-control" data-bind="value: formula.amount,
    attr: {'disabled': !formula.amountEditable},
    xbmask: 'currency',
    css: { 'has-error': hasError }">
For checkboxes, the value property is the value sent to the server, if the checkbox is checked, it doesn't determine whether the checkbox is checked or not. Use the checked property for that, so <checkboxelem>.checked = true checks it, <checkboxelem>.checked = false unchecks it.


You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to greasemonkey-users+unsubscr...@googlegroups.com.
To post to this group, send email to greasemonkey-users@googlegroups.com.
Visit this group at https://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to