on 11-30-2005 9:13 AM
Hello Everybody,
I want to write some client side javascript for Adobe forms.Like, i want to enable or disable some fields based upon some conditions or some events occured on the form. Events could be checking some check box or radio button or selecting value in combo box.
How can i capture such events and what code i need to write to change some field values in adobe form.
I am not aware of syntax for the same. So, if anybody had done this then please help me.
Regards,
Bhavik
Hi All,
In my case I have a drop down field having various values.According to those values the remaining fields in the form should get visible or invisible accordingly. Can you please help me out in scripting required in this case?
I have tried scripting as given below but it is not working. I request you to please tell me whats the problem in this and what needs to be done to achieve this.
For Example in case if i select "03 - Transfer" in the dropdown field named OPTION then I want to make New Personal Sub area field as visible and editable on the form so that user can enter data into it ELSE it should not be visible on the form.For this the scripting i wrote in javascript in the event CALCULATE for this field is as follows.
if($record.OPTION.DATA.FIELD == "03 - Transfer")
then
this.access == "open"
else
this.presence = "invisible"
endif
But this is not working when I check the form on portal.Please let me know what I need to do inorder to achieve this functionality.
Please provide me with information how to decide the event in which we should write the script?
Thanks in Advance.
Sarang
Edited by: sarang akhare on Oct 19, 2008 12:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi bhavik,
Check on to this link for Adobe details:
http://help.sap.com/saphelp_erp2005/helpdata/en/c8/4adf7ba13c4ac1b4600d4df15f8b84/frameset.htm
Hope this helps u,
Regards,
Nagarajan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nagarajan,
The links you have given gives the tutorials for offline scenarios and manipulation of pdf objects.
My requirement is different.
I need client side scripting for adobe forms. So, i can enable or disable some fields based on the checkboxes i clicked. Also i need to make some elements visible based on some conditions.
So, i want to know the javascripts for the same.
Regards,
Bhavik
Hi Bhavik,
I think your request is too general for anyone to provide concrete JavaScript examples. While it is easy to understand what you want to do, you may have to give a very concrete example of what you want to do (e.g. I have a table with the following fields, and I want a button to be active when the value of this field is higher than 7, ...). I guess your chances of someone sharing their JavaScript knowledge will be better.
In the meantime, you may want to look at this document from the Adobe website http://partners.adobe.com/public/developer/en/xml/Adobe_XML_Form_Object_Model_Reference.pdf, which contains some scripting examples, and also call up the FormCalc Reference (from the Designer documentation) in case this scripting language could help you as well.
Regards,
Markus Meisl
SAP NetWeaver Product Management
Hi Markus,
Thanks for clarifying me.
I have one check box, on click of that check box i need to visible three input fields.
One more thing. I am using same tamplate for creating request as well as displying that request.So, when this pdf in display mode then all the fields should be read only.
How can i acomplish using scripting in adobe form. I guess i have to use scripting for this. There is no other option.
Regards,
Bhavik
Hi Bhavik,
To change the access mode of a field (read only/editable) you have to set the property "access".
In JavaScript:
TextField1.access = "readOnly";
TextField1.access = "open";
A field can be visible, invisible or hidden (takes no space on the form). To change the presence of a field you can set the "presence" property to one of the following values: visible, invisible or hidden.
In JavaScript:
TextField2.presence = "invisible";
TextField2.presence = "visible";
You have to use a dynamic PDF.
If you want to change serveral fields you can use a loop (i.e you can ask a subform for its children).
Regards
Juergen
Message was edited by: Juergen Hauser
Hello Everybody,
SAP experts please help me on this topic. I want to know what scripting is required for my functionalities in Adobe form?
I am waiting for useful suggestions.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.