Thank you BUT you keep saying to add as an "OnFocus" event.  The problem is
that there is nowhere that shows an example of this being added in the
documentation or anywhere else.

Would you have an example of the code I would need to add it to the
signature field?




webpointz wrote:
> 
> Thanks...yes, i understand to write as an onFocus event...was just
> wondering HOW I code this when I already have code doing a Mouse Up?  How
> do you write an OnFocus event in iText?
> 
> 
> 
> Leonard Rosenthol-3 wrote:
>> 
>> Add it as an OnFocus event.  I don't see the problem...
>> 
>> Leonard
>> 
>> -----Original Message-----
>> From: webpointz [mailto:mbeveri...@webpointz.com] 
>> Sent: Wednesday, December 02, 2009 12:04 PM
>> To: itext-questions@lists.sourceforge.net
>> Subject: Re: [iText-questions] How can I change contents of a text field
>> at signing?
>> 
>> 
>> Thanks...I completely understand that.
>> 
>> It works if in Acrobat Pro I add a OnFocus to the signature field with
>> the
>> javascript there...BUT how would I incorporate this code into the iText
>> code?
>> 
>> Thanks
>> 
>> 
>> 
>> 
>> Brian Chappell wrote:
>>> 
>>> While I'm not able to offer a solution here I can talk about the
>>> principle
>>> which may help crystallise your dilemma.
>>> 
>>> When a document is digitally signed, the entire document is encrypted
>>> and
>>> the result of that encryption is stored with the document. This allows
>>> someone with the appropriate key to verify that the document has not
>>> been
>>> tampered with, they can compare a newly encrypted version of the
>>> document
>>> with the stored encryption result (the actual details vary but the
>>> outcome
>>> is the same). As a result, you can't sign a document, change a field and
>>> expect the signature to stand as the document is no longer the same as
>>> the
>>> signed version.
>>> 
>>> This is why you'd need to change the text and then sign the document for
>>> it
>>> to work.
>>> 
>>> Regards,
>>>   Brian
>>> 
>>> -----Original Message-----
>>> From: webpointz [mailto:mbeveri...@webpointz.com] 
>>> Sent: 02 December 2009 4:21 PM
>>> To: itext-questions@lists.sourceforge.net
>>> Subject: Re: [iText-questions] How can I change contents of a text field
>>> at
>>> signing?
>>> 
>>> 
>>> Hi...basically, the text needs to change ONLY if the signature is
>>> applied.
>>> So I need to change the text THEN have the signature applied and if the
>>> user
>>> cancels the action it reverts back to its original text.
>>> 
>>> As it stands now it appears as though the text is changing AFTER the
>>> signature is dropped in.
>>> Even if I move the text changing above and at the top of the onMouseUp
>>> it
>>> still changes after signing not before.  So, not sure what you meant by
>>> your
>>> answer.
>>> 
>>> 
>>> sign = acroForm.addSignature("sign", 122, 30, 300,
>>> 108).setAction(PdfAction.javaScript("
>>>                 this.getField('message').value = 'thank you';
>>>                 var sigCheck = this.getField('sign').value;
>>> 
>>>                 if (sigCheck != '')
>>>                 {
>>>                     ...do something else....
>>>                 }
>>>        
>>>         ", writer)); 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Leonard Rosenthol-3 wrote:
>>>> 
>>>> Change value then sign.
>>>> 
>>>> -----Original Message-----
>>>> From: webpointz [mailto:mbeveri...@webpointz.com] 
>>>> Sent: Wednesday, December 02, 2009 10:25 AM
>>>> To: itext-questions@lists.sourceforge.net
>>>> Subject: [iText-questions] How can I change contents of a text field at
>>>> signing?
>>>> 
>>>> 
>>>> I have a PDF that has say a text field called "message" and a digital
>>>> signature field called "sign".
>>>> 
>>>> When a user opens the PDF, the "message" field says "welcome" BUT I
>>>> want
>>>> the
>>>> text to change to "thank you" once the document is signed.
>>>> 
>>>> My problem is that if I try to dynamically change the text on the
>>>> MOUSEUP
>>>> action of the signing process, the text changes BUT it invalidates the
>>>> signature stating the field "message" was modified after the signature
>>>> was
>>>> applied.
>>>> 
>>>> Here is a sample of the code used (using ColdFusion code):
>>>> 
>>>>    sign = acroForm.addSignature("sign", 122, 30, 300,
>>>> 108).setAction(PdfAction.javaScript("
>>>> 
>>>>            var sigCheck = this.getField('sign').value;
>>>> 
>>>>            if (sigCheck != '') 
>>>>            {
>>>>            this.getField('message').value = 'thank you';
>>>>            }
>>>>    
>>>>    ", writer));
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> -- 
>>>> View this message in context:
>>>>
>>> http://old.nabble.com/How-can-I-change-contents-of-a-text-field-at-signing--
>>> tp26610705p26610705.html
>>>> Sent from the iText - General mailing list archive at Nabble.com.
>>>> 
>>>> 
>>>>
>>> ----------------------------------------------------------------------------
>>> --
>>>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>>>> a free event focused on virtualization and cloud computing. 
>>>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>>>> http://p.sf.net/sfu/redhat-sfdev2dev
>>>> _______________________________________________
>>>> iText-questions mailing list
>>>> iText-questions@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>> 
>>>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>>>> Check the site with examples before you ask questions:
>>>> http://www.1t3xt.info/examples/
>>>> You can also search the keywords list:
>>>> http://1t3xt.info/tutorials/keywords/
>>>> 
>>>>
>>> ----------------------------------------------------------------------------
>>> --
>>>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>>>> a free event focused on virtualization and cloud computing. 
>>>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>>>> http://p.sf.net/sfu/redhat-sfdev2dev
>>>> _______________________________________________
>>>> iText-questions mailing list
>>>> iText-questions@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>> 
>>>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>>>> Check the site with examples before you ask questions:
>>>> http://www.1t3xt.info/examples/
>>>> You can also search the keywords list:
>>>> http://1t3xt.info/tutorials/keywords/
>>>> 
>>>> 
>>> 
>>> -- 
>>> View this message in context:
>>> http://old.nabble.com/How-can-I-change-contents-of-a-text-field-at-signing--
>>> tp26610705p26611690.html
>>> Sent from the iText - General mailing list archive at Nabble.com.
>>> 
>>> 
>>> ----------------------------------------------------------------------------
>>> --
>>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>>> a free event focused on virtualization and cloud computing. 
>>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>>> http://p.sf.net/sfu/redhat-sfdev2dev
>>> _______________________________________________
>>> iText-questions mailing list
>>> iText-questions@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>> 
>>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>>> Check the site with examples before you ask questions:
>>> http://www.1t3xt.info/examples/
>>> You can also search the keywords list:
>>> http://1t3xt.info/tutorials/keywords/
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>>> a free event focused on virtualization and cloud computing. 
>>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>>> http://p.sf.net/sfu/redhat-sfdev2dev
>>> _______________________________________________
>>> iText-questions mailing list
>>> iText-questions@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>> 
>>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>>> Check the site with examples before you ask questions:
>>> http://www.1t3xt.info/examples/
>>> You can also search the keywords list:
>>> http://1t3xt.info/tutorials/keywords/
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>> http://old.nabble.com/How-can-I-change-contents-of-a-text-field-at-signing--tp26610705p26612398.html
>> Sent from the iText - General mailing list archive at Nabble.com.
>> 
>> 
>> ------------------------------------------------------------------------------
>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>> a free event focused on virtualization and cloud computing. 
>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>> http://p.sf.net/sfu/redhat-sfdev2dev
>> _______________________________________________
>> iText-questions mailing list
>> iText-questions@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>> 
>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>> Check the site with examples before you ask questions:
>> http://www.1t3xt.info/examples/
>> You can also search the keywords list:
>> http://1t3xt.info/tutorials/keywords/
>> 
>> ------------------------------------------------------------------------------
>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>> a free event focused on virtualization and cloud computing. 
>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>> http://p.sf.net/sfu/redhat-sfdev2dev
>> _______________________________________________
>> iText-questions mailing list
>> iText-questions@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>> 
>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>> Check the site with examples before you ask questions:
>> http://www.1t3xt.info/examples/
>> You can also search the keywords list:
>> http://1t3xt.info/tutorials/keywords/
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-can-I-change-contents-of-a-text-field-at-signing--tp26610705p26679790.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to