Solved

java to disable mouse roller button & if possible scroll bar in adobe pdf

Posted on 2010-09-13
20
1,110 Views
Last Modified: 2013-12-16
I am using livecycle, and have designed a dynamic form, which is navigated by buttons on each page. I want to disable the mouse wheel and sidebar scroll in adobe to allow the form to be navigated "as designed". I need some JavaScript  to do this when the form initiates itself.

Having now banged my head against many walls, am hoping that someone with javascript knowledge, of which I have the square root of Nil of, can provide the desired code.

Many thanks in anticipation  
0
Comment
Question by:andy-pat
  • 7
  • 6
  • 3
  • +1
20 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
Just in case you did not mean JAVA: http://kb.mozillazine.org/Javascript_is_not_Java
0
 

Author Comment

by:andy-pat
Comment Utility
Told u I new little about "JavaScipt" - thanks for the lesson, will amend Q accordingly
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
Comment Utility
You cannot do that with JavaScript in either Acrobat or Designer. Sorry.
0
 

Author Comment

by:andy-pat
Comment Utility
I think this is possible, downloaded a great bit of s/w called pdf layout which hides scroll bar, tool bar etc. etc - but doesn't stop the mouse wheel from scrolling - so near, yet so far.

I guess i could hide each page, then unhide on click of button and set focus to new page, but this seems like a lot of work just to stop navigation of the mouse wheel.

I'm sure it can be done, as I have seen a form in which it works - trouble is, don't know author, and its protected so i can't "borrow" the script.

Thanks mplungjan, makes sense for a separate zone, as i think dynamic forms are going to be more prevalent in business/commerce going forward.
0
 

Author Comment

by:andy-pat
Comment Utility
I found this bit of code, but it doesn't seem to work in Pdf - any ideas?

<script type="text/javascript">
function stop()
{
return false;
}
document.onmousewheel=stop;
</script>
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
If it is not here, it is not supported

http://www.adobe.com/devnet/acrobat/javascript.html


0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
Your Javascript snippet is a browser script. There are different flavors of JS: Every implementation supports the base language, and then an application can add a domain specific extension on top of that - these are then specific to the application, and you cannot use e.g. a browser script in Acrobat or vice versa. Acrobat's JS implementation does not give you access to these low level UI things. You can find out what you can do with the document object here: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.374.html
 (make sure that you enable the navigation pane on the left).

I assume that the "PDF Layout" software you are referring to is not implemented in Acrobat Javascript. Where did you find this application - I am not familiar with it.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:andy-pat
Comment Utility
yes, PDF Layout doesnt seem to use java - http://www.bureausoft.com/ is where i got it from, ever so handy tho, Ive asked them if there is a way of disabling mouse, stumped them too!

You can download 14 day trial of their layout package, I then purchased for apprx: £40 - well worth it, if only i could sort thsi mouse roller issue out!
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
If you want your users to follow the form page by page, there are other options:

You can hide the pages 2..n when the form is first opened, and after the user finished page 1, page 2 would be enabled and so on. Unfortunately this is only possible with AcroForms via page templates. You can however create new form elements dynamically in Designer, but it's not as simple as just spawning a complete new page. Would that be an option?

You could also hide all form elements past the current one, and only enable one at a time, when the last one was filled in.

In general however, I think it's a bad idea to force a user to use a form in a certain way. They may have a very good reason to jump around in the form and use the scroll wheel or the scroll bar (e.g. on page 10, they need to see what they did on page 1, so they just scroll back, look up that information and then scroll forward again to the current page).
0
 

Author Comment

by:andy-pat
Comment Utility
Because the form is dynamic, and sequential, it is important on this occassion to only allow a page at a time. I can hide pages, then make visible, but usiing the add action in ES2, this goes wrong - i.e. you can unhide view next page via the imbedded button, hide current page, then go 2 next page but when you go back it seems to skip pages? Would be so much easier just to disable the mouse scroll. I am sure it can be done, as have seen a form that does this, but the code in the form is secured so not sure how they done it
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
I would like to see that document - I still think it cannot be done - at least based on the documentation that Adobe provides for both Acrobat JavaScript and Designer scripting.
0
 

Author Comment

by:andy-pat
Comment Utility
go here - thsi is the form that I am trying to emulate - mine is very similiar

http://www.travelers.co.uk/iwcm/UKSolicitors/Product/proposal.html
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
The document does allow me to use the scroll bar and the scroll wheel: Whenever there are several pages per section, I can scroll. I can also scroll ahead - even if I have not yet finished the current section (with the arrow buttons in the upper left corner).

As you can see, the pages are created on the fly - only the pages for the current section are available, but the user can go through all sections without limitation.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
The answer was provided in http://#33676440 - it cannot be done.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
0
 

Expert Comment

by:_alias99
Comment Utility
All,
 
Following an 'Objection' by khkremer (at http://www.experts-exchange.com/Q_26589833.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
 
From the help pages:
http://www.experts-exchange.com/help.jsp#hs=29&hi=405

The correct answer to some questions is "You can't do that."
Sometimes, you will get an answer that isn't what you want to read, but it still may be the correct answer, and you should award points to the Expert that gave you that answer.

_alias99
Commnuity Support Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now