Javascript Tooltips, Popups, Captions - BoxOver  

Go Back   Javascript Tooltips, Popups, Captions - BoxOver > BoxOver > Bugs
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 08-01-2006, 04:20 PM
iscotony iscotony is offline
Junior Member
 
Join Date: Aug 2006
Posts: 1
Default Problem (and a fix) Re: Using the 'title' attribute and IE

Pretty swanky script. Nice and clean. The biggest issue we've run into though is when we try to use this on an image map on IE. IE displays 'title' attribute information in a yellow tooltip - which isn't terrible in most cases but here it displays the enitre Code of the boxover in the hover box.

The solution is pretty simple: Don't use the 'title' attribute at all:

I went through the HTML page and changed references from 'title="..."' to 'hoverbox="...."', and then went into the boxover code and made the following changes:

Code:
function scanBO(curNode) { var btext = curNode.getAttribute('hoverbox'); if (checkElemBO(btext)) { curNode.boHDR=getParam('header',btext); curNode.boBDY=getParam('body',btext); curNode.boCSSBDY=getParam('cssbody',btext); curNode.boCSSHDR=getParam('cssheader',btext); curNode.IEbugfix=(getParam('hideselects',btext)=='on')?true:false; curNode.fixX=parseInt(getParam('fixedrelx',btext)); curNode.fixY=parseInt(getParam('fixedrely',btext)); curNode.absX=parseInt(getParam('fixedabsx',btext)); curNode.absY=parseInt(getParam('fixedabsy',btext)); curNode.offY=(getParam('offsety',btext)!='')?parseInt(getParam('offsety',btext)):10; curNode.offX=(getParam('offsetx',btext)!='')?parseInt(getParam('offsetx',btext)):10; curNode.fade=(getParam('fade',btext)=='on')?true:false; curNode.fadespeed=(getParam('fadespeed',btext)!='')?getParam('fadespeed',btext):0.04; curNode.delay=(getParam('delay',btext)!='')?parseInt(getParam('delay',btext)):0; if (getParam('requireclick',btext)=='on') { curNode.requireclick=true; document.all?curNode.attachEvent('onclick',showHideBox):curNode.addEventListener('click',showHideBox,false); document.all?curNode.attachEvent('onmouseover',hideBox):curNode.addEventListener('mouseover',hideBox,false); } else {// Note : if requireclick is on the stop clicks are ignored if (getParam('doubleclickstop',btext)!='off') { document.all?curNode.attachEvent('ondblclick',pauseBox):curNode.addEventListener('dblclick',pauseBox,false); } if (getParam('singleclickstop',btext)=='on') { document.all?curNode.attachEvent('onclick',pauseBox):curNode.addEventListener('click',pauseBox,false); } } curNode.windowLock=getParam('windowlock',btext).toLowerCase()=='off'?false:true; btext=''; curNode.hasbox=1; } else curNode.hasbox=2; }
Basically just the first line there grabbing from the attribute, then replace 'curNode.title' with 'btext'. Boom. Done.

Tested on: Firefox (Win/*Nix), Safari, IE 6. Would like a test on IE 5 Win, but I'm not going to lose any sleep over it.
Reply With Quote
  #2  
Old 08-10-2006, 11:40 PM
olly olly is offline
Administrator
 
Join Date: Jul 2005
Posts: 82
Default Careful though

When initially designing BoxOver I was using a custom attribute like you have used but it wouldn't work in Opera which is why I went with the title attribute in the end.

Opera is a pretty bad browser anyway as far as I'm concerned but I thought a few people out there might use it...
__________________
Javascript tooltips / popups
Reply With Quote
  #3  
Old 09-25-2006, 11:01 AM
squall1385 squall1385 is offline
Junior Member
 
Join Date: Sep 2006
Posts: 1
Unhappy Can you send the working files for this

Can you send the working files for this? I thried it but it's not working. I'm just a beginner in javascript and I think that yellow boxover really needs to disappear too. Please send working files... please... please... please... here is my e-mail - squall1385@yahoo.com... THANKS ALOT!
Reply With Quote
  #4  
Old 10-25-2006, 09:20 PM
blizeH blizeH is offline
Junior Member
 
Join Date: Oct 2006
Posts: 6
Default

Did anyone manage to find a work around to this in the end? I've tried using that code mentioned in the first post but it's not displaying anything at all now for some reason

Cheers
Reply With Quote
  #5  
Old 10-30-2006, 08:45 PM
blizeH blizeH is offline
Junior Member
 
Join Date: Oct 2006
Posts: 6
Default

For anyone else reading this; his solution actually works perfectly, it just hasn't displayed properly in the code box. View source and copy from there
Reply With Quote
  #6  
Old 12-01-2006, 08:38 PM
jerone jerone is offline
Junior Member
 
Join Date: Dec 2006
Posts: 3
Lightbulb

a suggestion;
maybe it would be handy to make the used tag easly editable. make a var at the beginning of the script with the tag you want to use. normaly it would be the 'title'-tag, and the 'boxover'-tag in this case above.
Reply With Quote
  #7  
Old 05-25-2007, 11:03 PM
gvanvoor gvanvoor is offline
Junior Member
 
Join Date: May 2007
Posts: 1
Default

I'm encountering the "yellow title" bug in opera (version 9.21 on OS X), but I'd rather not use the boxover attribute because this will prevent my code from validating. So I was wondering if there's a way to adapt the code to function with mouseover/mouseout events? (sadly enough I don't know enough about javascript to do it myself).
A part from this small problem, it's working perfectly. Thanks and congratulations to all those involved.
Reply With Quote
  #8  
Old 09-12-2007, 07:40 AM
tupm tupm is offline
Junior Member
 
Join Date: Sep 2007
Posts: 1
Default netphone

netphone is very good
Reply With Quote
  #9  
Old 10-04-2007, 01:38 PM
randyschreiber randyschreiber is offline
Junior Member
 
Join Date: Oct 2007
Posts: 4
Default

Has anyone tested this fix in IE 7? I updated the script on my site accordingly, and couldn't get it working...
Reply With Quote
  #10  
Old 10-04-2007, 02:16 PM
randyschreiber randyschreiber is offline
Junior Member
 
Join Date: Oct 2007
Posts: 4
Default

scratch that...fixed by placing <script> in the header (where it should be)
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 07:41 PM.