This content has been marked as final.
Show 2 replies
-
1. Re: Trying to keep field blank using JavaScript.
(Justin_Klei) Jul 5, 2006 5:23 AM (in response to John.Kordas)John_Kordas@adobeforums.com wrote:
> I have put this script in to the totals field which works fine but displays $0.00.
>
> form1.costs.spetot.rawValue = form1.costs.spei1.rawValue + form1.costs.spei2.rawValue;
>
Try this instead:
var totalval = form1.costs.spei1.rawValue + form1.costs.spei2.rawValue;
if (totalval == 0 || totalval == null || totalval == "")
{
this.rawValue = "";
}
else
{
this.rawValue = totalval;
}
Hope this helps!
Justin Klei
Cardinal Solutions Group
www.cardinalsolutions.com
PS - You'll get much better responses to these types of questions in the Designer forum rather than
this one. -
2. Re: Trying to keep field blank using JavaScript.
John.Kordas Jul 5, 2006 2:34 PM (in response to John.Kordas)Thank you Justin,
I am immensely great full and for your help it worked like a treat. I have posted a couple of questions in the Designer section but did not get any response. Not sure if its the why I put my questions out , so I thought Id try here.
Ive created some basic forms using the FormCalc language but never tried JavaScript. Ive spent the last 2 weeks watching JavaScript DVDs which are more based on WEB design. I also purchased John Deuberts book Extending Acrobat Forms with JavaScript which was fantastic, until you try some of the scripts in Designer. Ive also downloaded all the reference files and examples off the Adobe site.
This was my last hope if no one responded to this post I was going to give it away. So you can understand why I am so grateful.
Thanks Justin

