Page 1 of 1

Need something like a tool tip but with ...

Posted: Tue Mar 12, 2013 1:11 pm
by Wayne C.
I need something like a tool tip but would display data instead of a hard coded note.

We have a table (not a grid) on one of our green screens. Two of the elements are Driver Code and Driver Name. We are going to remove the Driver Name from the table so that we can use the space for other data.

What we'd like to do on the Genie side is to be able to hover over the Driver Code and have the Driver Name (and possibly 1 or 2 additional elements) from the Driver Master file appear in a box similar to the tool tip function. I scanned over the manual and didn't see anything I could use. If this is possible, can you steer me in the right direction?

Thanx.

Re: Need something like a tool tip but with ...

Posted: Tue Mar 12, 2013 1:13 pm
by David
How would you get this data? Genie is aware of only what is on screen. Are these additional fields on screen?

Re: Need something like a tool tip but with ...

Posted: Tue Mar 12, 2013 2:52 pm
by Wayne C.
I knew you were going to say that and thru my limited experience with Genie I agree with you. I suggested to my boss that we just create a function key to do create a small window that would display the driver name, etc. and our problem would be over. He's thinking that we would be able to create some script (javascript possibly??) to retrieve the file/data.

Yes, these would be fields not on the screen.

Would you say creating a function key on the green screen side the best route to go?

Re: Need something like a tool tip but with ...

Posted: Tue Mar 12, 2013 3:06 pm
by David
You could write JavaScript code to fetch the data, but it would be fairly involved. You'd have to make the JavaScript do an Ajax call to a CGI program or similar. This can certainly be done, but it would be a bit difficult if you have no prior experience with JavaScript/Ajax and with CGI programming.

Creating a function key in the display file would be easier, as this can be done with traditional RPG/DDS.

Re: Need something like a tool tip but with ...

Posted: Tue Mar 12, 2013 4:51 pm
by Scott Klement
So, assuming he has the data somehow, how could he make something that looks like a tooltip? Using the "tool tip" property of the widget?

Re: Need something like a tool tip but with ...

Posted: Tue Mar 12, 2013 5:51 pm
by Wayne C.
After thinking this thru a bit more, the "tool tip" idea won't work for us. I think we are going to create a function key to display a window. Then (in Genie) we'll use the mouseover event to execute the function key. I think we're good to go. Once we get the new window functioning, we're going to use it to launch emails since the email address is one of the pieces of data we wanted to be displayed.

So I think we're good to go. Thanks guys.

Re: Need something like a tool tip but with ...

Posted: Tue Apr 24, 2018 1:03 pm
by Wayne C.
Revisiting a question I asked 5 years ago just to see if the answer will be the same :)

David wrote:
"You could write JavaScript code to fetch the data, but it would be fairly involved. You'd have to make the JavaScript do an Ajax call to a CGI program or similar. This can certainly be done, but it would be a bit difficult if you have no prior experience with JavaScript/Ajax and with CGI programming. "

"Creating a function key in the display file would be easier, as this can be done with traditional RPG/DDS."

Can't imagine the process would've changed... just checking anyways.

Re: Need something like a tool tip but with ...

Posted: Tue Apr 24, 2018 1:10 pm
by Megan
Hello Wayne,

It is possible to create custom tooltips using JavaScript! We published a blog post with an example of how to do this here: http://blog.profoundlogic.com/profound- ... m-tooltips. If you would like an example more specific to your issue, please contact us at support@profoundlogic.com and we'll be happy to look into creating a custom example for you.

Thanks!

Re: Need something like a tool tip but with ...

Posted: Tue Apr 24, 2018 1:19 pm
by Scott Klement
I've had really nice results using Walter Zorn's tooltip library.
http://www.walterzorn.de/en/tooltip/tooltip_e.htm

What you do is load his JavaScript file by adding a <script> tag to your skin. Then you can render the trips using the onmouseover and onmouseout events, simply by calling the JavaScript functions.

onmouseover: Tip('my tooltip text');
onmouseout: UnTip();

This library lets you code HTML in the tooltips, so you can do just about anything with it.