?
Solved

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

Posted on 2010-09-13
20
Medium Priority
?
1,260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 total points
ID: 33676440
You cannot do that with JavaScript in either Acrobat or Designer. Sorry.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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 add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
Suggested Courses

777 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