File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes make different hover info appear over a link depending on option selected Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "make different hover info appear over a link depending on option selected" Watch "make different hover info appear over a link depending on option selected" New topic
Author

make different hover info appear over a link depending on option selected

Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

I am trying to find a way to make hoverinfo appear above a link depending on the option selected from a select box:



I thought I could add onHover to the element, and have it trigger some javascript that returns the value as a String. Then in that same element have something like onhover=jsReturnValue

But the html editor I am using is putting jsReturnValue between ""'s which I am assuming means this is not a correct way to do this. So the hover info reads 'jsreturnValue' rather than the value it evaluates to from the onHover javascript call.

Can anyone help me figure out a better way to handle this?


True wisdom is in knowing you know nothing - Socrates
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
onhover? Using a library?

Eric
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

I'd say you have a few options but the simplest that come to mind is the following. Note that here, I'm using jQuery but you can use your library of choice.



Here is a working example you can play with.


GenRocket - A Test Data Generation Platform
Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

I am having trouble with this unfortunately.
I can get the tutorial jquery example to work using this



But when I try to do a variation on what the poster above suggested nothign happens. Here is pseudeo source code - (note I have replaced much of the text and urls, and this is about the first 1/3 of the source code for the page - the rest of the source is basically repeating what is here to make different columns)

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: make different hover info appear over a link depending on option selected
 
Similar Threads
SELECT boxes in Netscape
jquery newbie question on select element
Can i get the value of a select from a drop down without a form into javascript?
Sounds like simple issue but failing
Getting value of Disabled field