Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-11-2002, 03:49 PM   PM User | #1
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
Attribute title="some text"

The value of the title attribute is rendered by most visual browsers as a tool tip. Is there a way to change the style and behaviour of this tool tip (say I want it to appear immideately, have black background and white text). I looked into it but could not find any info.

Please, do not post the links to custom tooltip scripts. The reason I'm asking this question is that I developed my own script (can be found here ).
I want to make sure that the statement "currently browsers do not allow to customize the behaviour and appearance of tool tips" is correct.

Thanks
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

Last edited by Vladdy; 07-11-2002 at 08:39 PM..
Vladdy is offline   Reply With Quote
Old 07-11-2002, 04:00 PM   PM User | #2
Soldier Bob
New Coder

 
Join Date: Jul 2002
Location: USA, East Coast
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Soldier Bob is an unknown quantity at this point
older browser no, that is correct

NS 4.x types etc wont allow you to change a popup "tooltip".

As far as the latest and greatest on NS6/7 or IE 6 I dont know for sure.

It would seem the IE side of things might allow some customization.

But making your own layer popup/hide, is probably the only stable way to do a tool tip.

-S. Bob
Soldier Bob is offline   Reply With Quote
Old 07-11-2002, 06:29 PM   PM User | #3
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
To my knowledge, you can't change the behavior of the tooltip in any browser without some of your own effects.

Gecko would make it easy to implement your own version of title:

*[title] {
-moz-binding: url(mytitle.xml#title);
}

And then you could write a binding that copies the title text, removes the attribute (prevents default behavior from happening), then popping up an appropriate layer.

It would be slightly more complicated to make it as transparent in IE (actually, you would have to use * { behavior: url(bla.htc); } and check for the title attribute, but this becomes less transparent as any other element with an assigned behavior would get wiped out).

But for your original question - I'd love to be proven wrong, but I'm pretty sure.
__________________
jasonkarldavis.com
jkd is offline   Reply With Quote
Old 07-11-2002, 06:45 PM   PM User | #4
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
Thanks, jkd.

As I said I finished the implementation of tool tips for DOM compliant browsers and just wanna make sure that I state correctly that default browser tool tip is not customizable.
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Old 07-11-2002, 07:11 PM   PM User | #5
Bosko
Regular Coder

 
Join Date: Jun 2002
Location: The Netherlands
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Bosko is an unknown quantity at this point
Those tooltips cant be customized because they are just the default system tooltips,which cant be fully customized (although real applications can change the way they look)
Bosko is offline   Reply With Quote
Old 07-11-2002, 07:35 PM   PM User | #6
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
Well, if you have nothing against XUL (taken from XULPlanet tutorial):

Code:
<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window
  id="example-window" title="Example 5.3.2"
  xmlns:html="http://www.w3.org/1999/xhtml"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <button label="Save" tooltiptext="Click here to save your stuff"/>

<tooltip id="moretip" orient="vertical" style="background-color: #33DD00;">
  <description value="Click here to see more information"/>
  <description value="Really!" style="color: red;"/>
</tooltip>

<button label="More" tooltip="moretip"/>


</window>
But I don't believe you could migrate that to any HTML/XHTML document.
__________________
jasonkarldavis.com

Last edited by jkd; 07-11-2002 at 07:37 PM..
jkd is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:31 AM.


Advertisement
Log in to turn off these ads.