Have a drop down list with yes or no choices. Yes will let you add instances of an item. When the user deletes all the items, I want to set the choice to No.
Haven't been able to figure out how to change the answer in Javascript.
Any help would be appreciated.
Thanks,
Patrick
Views
Replies
Total Likes
You need to put the code in the delete button click event. After deleting the intance, check for the InstanceManager count and if it is "1" or "0" based on your requirement, set the rawValue of the DropDown to "No"..
Subform.instanceManager.removeInstance(intIndex);
var intTotalInstances = Subform.instanceManager.count;
//Check the total instances after each delete of the Instance
if(intTotalInstances == 1){
DropDown1.rawValue = "No";
}
Thanks
Srini
Views
Replies
Total Likes
Tried it without success.
Am using this.parent...parent.drop_-box.rawValue = "No";
Views
Replies
Total Likes
Seems to be you are not referencing to the control properly.
You can test your code by putting the same line of code in a messagebox.
xfa.host.messageBox("" + this.parent...parent.drop_-box.rawValue);
If you get the current value of the dropdown, then we have to check other reasons.
If you do not get the current value of the dropdown, then the problem is in how you are referencing the control.
If you still have issues after the above test, if you can, post your form and I can have a look at it.
Steps to upload the document
1) goto acrobat.com website
2) login with your Adobe login/password.
3) In Actions you will find Upload. Select your form and upload.
4) After uploading, select form name in All Files section and right click and select share.
5) Check the checkbox "Allow anyone with a link to view this document".
6) Copy the URL link and post it in the forum.
Thanks
Srini
Views
Replies
Total Likes
Dear Srini,
Your answer is the one I expected to work. You are on to something about acess to the correct node.
I tried a direct reference to the drop box form1....dropdownlist.rawValue and in Javascript it says it doesn't recognize "form1". Not sure if I am up against an upper limit of file size or why it is acting up. If I did this.parent.parent...dropdownlist.rawValue the reference is to a null node.
Thanks,
Patrick
Views
Replies
Total Likes
If you can, post your form and I can have a look at it.
Steps to upload the document
1) goto acrobat.com website
2) login with your Adobe login/password.
3) In Actions you will find Upload. Select your form and upload.
4) After uploading, select form name in All Files section and right click and select share.
5) Check the checkbox "Allow anyone with a link to view this document".
6) Copy the URL link and post it in the forum.
Thanks
Srini
Views
Replies
Total Likes
Logged in, but where do I find #3 Action?
Having issues looking to retrieve prevText as well.
Views
Replies
Total Likes
You need to click on Files on the top and click on Upload in the left menu. (As shown in the picture).
After you upload the file, right click the file and choose share..
Views
Replies
Total Likes
Views
Replies
Total Likes
I am looking at the document..It's a very big document. Can you please provide some write up on which page/ where the problem is?
Thanks
Srini
Views
Replies
Total Likes
The problem is with the NewBuilding_SF.
Views
Replies
Total Likes
For this portion, skip the log in page. Preview the document, go to the 7th page (has New Buildings? on the right) and select Yes.
When the number of new buildings goes to zero, I want the dropdown list to go to No or better yet "" (no answer).
Views
Replies
Total Likes
The reference to the dropdown was changed like the following to fix the issue..
xfa.form.form1.NewBuildings_SF.NewBuildings.rawValue =0;
I got the correct reference to the DropDown box by putting a messageBox in the change event of the Dropdown.
xfa.host.messageBox("" + this.somExpression);
Since the DropDown is not part of the repeating NewBuildingList, you can directly reference the DropDown box in your code instead of traversing thru the parent.parent... etc
this.parent.parent.parent.parent.parent.NewBuildings.value = 0;
Thanks
Srini
Views
Replies
Total Likes