![]() |
| ||
| Return value based upon visibility of form field? Hello, I am entirely new to Javascript (try yesterday!), and I need to create a price sheet form in Acrobat for a client. While the answer to this question may already be here on this site, I am sufficiently clueless about how to search for it and appreciate tremendously your patience and good will! Here's what I'm attempting to do: • The Price List is comprised of a variety of items Items A, B, C & D (for example) • An overall quantity is entered at the top NumPosters • An ItemARate, ItemBRate, ItemCRate, ItemDRate has been established • When items A & B are checked, they should be multiplied by the NumPosters, and each ItemPrice should be added to the total. I have this so far in the ItemAPrice field calculation: Quote:
Quote:
Prior to my adding of the ItemATotal field, I added up all of the ItemPrices and naturally got a total for all items rather than only those items that had been checked. Any thoughts on this (I suspect) rather simple bit of coding would be greatly appreciated!! Also, any really good Beginning JavaScript books you folks would recommend?? Clearly I need one! Thanks! TrinityAvatar |
| ||
| Re: Return value based upon visibility of form field? This is probably my key question here: Quote:
|
| ||
| Re: Return value based upon visibility of form field? A quick throw over this 1. Hope it will help you all the way... <html> |
| ||
| Re: Return value based upon visibility of form field? Thanks so much for your reply! I will try it out later today and get back to you to let you know how it works! Thanks again! |
| ||
| Re: Return value based upon visibility of form field? Good Morning, Thanks again for your coding yesterday... however, I suspect, due to my limited experience with this stuff, that I failed to describe my need adequately. Essentially, I need a toggle switch: If "Yes" fill in field value If "No" return blank field What I'm getting right now is: If "Yes" show field value If "No" hide field value However, I need to add up all the field values and because the field value is not cleared, it continues to reflect in the total, hidden or not. This is what I've got in the Yes Checkbox in the Acrobat Form. (I decided that with a Yes Checkbox, and a No Checkbox, I might be able to pull this off): Quote:
1) Hide box AND 2) clear field value... Alternately, if the single check box could both: If "Yes" calculate field value and show If "No" clear field value and hide That'd be great! Thanks again, in advance!! Best, TrinityAvatar |
| ||
| Re: Return value based upon visibility of form field? Hey! I figured it out! Here's what I came up with for the "No" Checkbox on the Acrobat Form: Quote:
Best, TrinityAvatar |
| ||
| Re: Return value based upon visibility of form field? I was hasty! I was able to reset the value of the No Checkbox to 0.0, but now the Yes checkbox results is 0.0 as well... :-( I can only over ride the reset value if I put in an absolute value. Here's the "Yes" CheckBox... Quote:
Quote:
Thank you for your patience! |
| ||
| Re: Return value based upon visibility of form field? I think what you are looking for is "checked". document.FromName.checkBoxName.checked That will return "true" or "false" if the checkbox is enabled or not. |
| ||
| Re: Return value based upon visibility of form field? Here you go! This wil clear things out for you. Good day... <html> |
| ||
| Re: Return value based upon visibility of form field? See next post... sorry! |
| All times are GMT -4. The time now is 8:21 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC