Not sure what would be causing this, so any input would be very helpful
I am using the following JAVA script to set focus on a text box after the user clicks on in a check box.
Using the “Click” event
xfa.host.setFocus(form1.requester_info.m_approve.Table9.Row1.m_name);
When I click on the check box, nothing happens. Focus does not move
Using the “Change” event I use the same code;
xfa.host.setFocus(form1.requester_info.m_approve.Table9.Row1.m_name); It works.
I have 4 check boxes on the form that will use this code(changing the focus of course) and I get the same results for each check box.
Anyone have any ideas what I could be doing to bugger this up
Chomp
Solved! Go to Solution.
Views
Replies
Total Likes
Just tried it here and it is working fine on both events. I used version 9 and 8 of Acrobat. If it is working for you then that is great ...if you want to pursue this further then read on.....
What version ore you using?
When you move the code to the click event you can add an app.alert("Click event fired!") to indicate that the event fired (just as a message to yourself for debugging purposes. If it still does not work check the javascript console by hitting Cntrl - J (assuming you are using Acrobat) and see if there are any error messages, In this case the change and the click event are doing the same thing.
Paul
Views
Replies
Total Likes
So what's the problem with using the Change event?
To answer your question though, I believe the main difference for a check box is that you are changing the value when you click on it, hence the Change event. I could be wrong though.
Views
Replies
Total Likes
Just tried it here and I am getting the same behaviour ....can you send me your form so I can test it?
Paul
Views
Replies
Total Likes
Hello pguerett
I am sorry for leaving this until today but……weekend… I thought I would like to be form free for a couple of days.
I have uploaded the form to https://acrobat.com/#d=fNcy51Gm0hBYRTEwS4SMww
For you to review. I have set the form up as people would see it if when they first open the form. The user will need to click on text boxes to open up different parts of the form. I am a believer in the phrase, “if you don’t need to read it, you don’t need to see it”. Please keep in mind I have not added all the help notes nor have I completed the accessibility text.
You will see that I have used the “change” and not the “click” as I was still unable to get the “click to work.
Thanks Again
Views
Replies
Total Likes
Just tried it here and it is working fine on both events. I used version 9 and 8 of Acrobat. If it is working for you then that is great ...if you want to pursue this further then read on.....
What version ore you using?
When you move the code to the click event you can add an app.alert("Click event fired!") to indicate that the event fired (just as a message to yourself for debugging purposes. If it still does not work check the javascript console by hitting Cntrl - J (assuming you are using Acrobat) and see if there are any error messages, In this case the change and the click event are doing the same thing.
Paul
Views
Replies
Total Likes
Thanks pguerett
I tried it here.... It now seems to be working fine. As a note. I brought it up in Reader 9 and the "click" function worked fine. When I brought it up in Adobe Acrobat Professional 8, it did not work.......
Thanks Again pguerett
Chomp
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies