How to create hover text over a dropdown item in an Adobe PDF

Explorer ,
May 19, 2020 May 19, 2020

Copy link to clipboard

Copied

I'd like some hover text to appear over a dropdown item when a user is deciding to slelect it.

 

A purely hypothetical example.

Say my item list is "next day", "2 day","next week" for shipping opitions.

 

However, when a user goes down the dropdown list I would like a text box to pop up with few details on that item to help them make a choice.  For example, with the mouse over "next day" it may say "You will have the option later of choosing from next day USPS Mail, UPS or FedEx, but only DHL outside the US"

 

 

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms

Views

425

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , May 19, 2020 May 19, 2020
If the arrow keys are used to move up and down the list then you could do something. Otherwise it is not possible, there is no event for the mouse moving over a list entry.  

Likes

Translate

Translate
Adobe Community Professional ,
May 19, 2020 May 19, 2020

Copy link to clipboard

Copied

If the arrow keys are used to move up and down the list then you could do something. Otherwise it is not possible, there is no event for the mouse moving over a list entry.  

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 20, 2020 May 20, 2020

Copy link to clipboard

Copied

Thanks Thom,

What could be done if arrow keys are used?  And is this a special list or field set up?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 01, 2020 Jun 01, 2020

Copy link to clipboard

Copied

LATEST

In order to display some kind of hover text for an item, there has to be an event trigger that indicates when that item is in the focus. The user moving the mouse over the items does not produce any events. But the arrow keys actually make selections, so they trigger Keystroke events. Use the keystroke event to display hover text. Unfortunately there is no location information available for the list item, so the hover text can't be displayed next to the highlighted item. It's a bit of an unfortunate situation, because while there are no events for the mouse passing over the list items, there is location info for the mouse. It's a situation where both things exist, you just can't have them at the same time 😞 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines