• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

javascript event ?

 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea what showtooltip is.
 
Sam Doder
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, sure you can remove any handler from another handler. Not sure that solves your problem or not.
 
Sam Doder
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic