This has been driving me crazy.. I am trying to return a value from a variable and I can’t seem to do it. When I multiply the variable by something, it works fine, but when I try to just show that one variable on a keyup function, it’s a no go.
This is the problem in the script I am running into:
$("input.numberOfAccounts").keyup(function () {
$("input.pricingPerAccount").val($(newPricePerAccount));
});
As you can see, newPricePerAccount is the value I want to return and I have tried everything to make it just return that. What am I doing wrong?
Here it is in a jsfiddle, it will give you more insight.
EDIT: I have updated the fiddle.. All I am really trying to do is match input.pricingPerAccount to the variable of newPricePerAccount and it keeps returning just object, object. What’s wrong?
Is this what you wanted? http://jsfiddle.net/GLnQx/2/
EDIT:
If I understand your comment correctly, you want to re-update the value of
newPricePerAccounteach time as well? Is this what you mean? http://jsfiddle.net/GLnQx/6/