Solved

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

Posted on 2010-09-13
20
1,195 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
ID: 33670688
Just in case you did not mean JAVA: http://kb.mozillazine.org/Javascript_is_not_Java
0
 

Author Comment

by:andy-pat
ID: 33672168
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
ID: 33676440
You cannot do that with JavaScript in either Acrobat or Designer. Sorry.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:andy-pat
ID: 33680189
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
ID: 33680202
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
ID: 33680225
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 33680236
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
ID: 33681457
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
 

Author Comment

by:andy-pat
ID: 33681509
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
ID: 33681588
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
ID: 33698883
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
ID: 33710998
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
ID: 33722739
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
ID: 33749251
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
ID: 34054667
The answer was provided in http://#33676440 - it cannot be done.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 34054759
0
 

Expert Comment

by:_alias99
ID: 34082845
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
links not working 2 27
HTML auto refresh to another site 4 30
Validating number not work with decimal 4 27
fillable forms on website 2 8
Inserting page numbers in Portable Document Files not only enhances manageability but also makes them look professional. With numbered pages, the file appears more organized and it becomes easier to search for a particular page. The size and the vol…
Messaging apps are amazing tools with the power to do a lot of good, but the truth is the process of collaborating with coworkers requires relationships established through meaningful communication - the kind of communication that only happens face-…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…

726 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