my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes javascript event ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "javascript event ?" Watch "javascript event ?" New topic
Author

javascript event ?

Sam Doder
Ranch Hand

Joined: Feb 06, 2008
Posts: 204
Is their an easy way to turn off an onmouseover function call from my onclick function?

for example I have
td tag that has a mouseover and onclick tooltip function

I want when the user clicks on the td element the method tooltipcopy disables the showtooltip from executing.
It looks bad with the mouseover tool tip up after I have clicked to get the other copyable tooltip.

Thanks for any help

What is happening is I have a div tag that does the equivalent of the standard tooltip title attribute, But allows the person to copy from it. I need the other tool tip function that uses
document.getElementById(...).style.title = "..." ; to be disabled when the onclick occurs , if the person justs mouses over then I want the showtooltip to use the default tool tip.... But if clicked on the td tag occurs then I need it to not show the mouse over tooltip but just the regular div tag one so the users has the ability to copy the tool tip message.

Thanks (2 tool tips on top or around each other looks mess.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

I have no idea what showtooltip is.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sam Doder
Ranch Hand

Joined: Feb 06, 2008
Posts: 204
It is tough to post the code but it looks like this it is on a jsp page.



I just want to not have the regular tooltip show up when I click on the td tag but when I mouse over I want it to use the regular title= "my tool tip one"

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Well, sure you can remove any handler from another handler. Not sure that solves your problem or not.
Sam Doder
Ranch Hand

Joined: Feb 06, 2008
Posts: 204
Well how do you do that.

And how would you reenable the event after you close the div tag tool tip

Does
document.getElementById(element_id).title = null ;
Is this equivalent to having no tool tip or should I use
document.getElementById(element_id).title = "" ;
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Do you want to remove the handler or the title? It's not close to the same thing.

But yeah, assigning null should eradicate the title.
Sam Doder
Ranch Hand

Joined: Feb 06, 2008
Posts: 204
well my problem is this



I don't know of a way to disable the tool tip function when I click on the td element I have tried putting
document.getElementById(....).style.title = null ; in the tooltipcopy function but it still stay's up with my div tag tool tip?
Is this in some sort of timer or something that I need to turn on or something.

Any help would be great thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

I think you're painted into a corner. The tooltip is triggered before you get a chance to turn it off. I'd back up and figure out why this is such a mess in the first place. Why all the tinkering? I'd either use title tooltip, or provide my own, and avoid all the tinkering.
Sam Doder
Ranch Hand

Joined: Feb 06, 2008
Posts: 204
Well I would just use the standard title tool tip but I want it to stay up so I can copy from it if I do an onclick ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Then ditch the title and use a jQuery tooltip plugin or something. I don't understand all the complexity around trying to tinker with it at all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javascript event ?
 
Similar Threads
To have multi line tooltip text
h:dataTable and rich:toolTip
changing the color?
Is there are tooltip for select listbox?
tooltip ?