Javascript Tooltips, Popups, Captions - BoxOver  

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

Reply
 
Thread Tools Display Modes
  #1  
Old 11-11-2006, 09:22 AM
jamesm jamesm is offline
Junior Member
 
Join Date: Nov 2006
Posts: 7
Default Won't work... Not sure why.

Here's a link:

http://www.mablio.com/testcase.html

The first input displays in the upper right corner in firefox 2 on linux.

I really wish it would work because your tooltips are great and from what I could tell from the examples, the calendar would be perfect for my site.

Thanks!
Reply With Quote
  #2  
Old 11-11-2006, 03:00 PM
olly olly is offline
Administrator
 
Join Date: Jul 2005
Posts: 82
Default Hmmm

I haven't seen this before but I'd be lying if I said that I had tested the calendar extensively.

Offhand though, I would have to say this is due to the DOCTYPE declaration at the top of the page - I see you are in strict parsing mode. Would you be able to remove this declaration and test it quickly. If this is the case I will make an update to get around this, I remember BoxOver had similar problems in its early days.
__________________
Javascript tooltips / popups
Reply With Quote
  #3  
Old 11-12-2006, 09:25 PM
jamesm jamesm is offline
Junior Member
 
Join Date: Nov 2006
Posts: 7
Default

Made it XHTML transitional, no luck...
Made it html trans no luck either.

I'll leave it in html transitional for you.
Reply With Quote
  #4  
Old 11-15-2006, 11:42 PM
plingscore_jonas plingscore_jonas is offline
Junior Member
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 7
Default Some changes that will make it work

Hi!

To solve your problem you need to do two changes in the calendar.js-file

First change the Z-index.
In the part in the calendar.js-file where the calendar-table is created, add the following to the style-attribute: z-index:100;

Second thing, give it the correct position:
(I dont want to change too much of the original code, so here´s some additions that will make this fix complete)
a.) In the lcs()-function, replace the following code:
Code:
getObj('fc').style.left=Left(ielem); getObj('fc').style.top=Top(ielem)+ielem.offsetHeight;
with this code:
Code:
pos = getPosition(ielem); getObj('fc').style.left = pos['x']+'px'; getObj('fc').style.top = (pos['y']+20)+'px';
b.) Add the following function to the calendar.js-file
Code:
function getPosition(pObject) { var x = y = 0; if (pObject.offsetParent) { x = pObject.offsetLeft y = pObject.offsetTop while (pObject = pObject.offsetParent) { x += pObject.offsetLeft y += pObject.offsetTop } } tArray = new Array(); tArray['x'] = x; tArray['y'] = y; return tArray; }

And we are done!

// Jonas
Reply With Quote
  #5  
Old 11-16-2006, 12:10 AM
jamesm jamesm is offline
Junior Member
 
Join Date: Nov 2006
Posts: 7
Default

thanks for the patch!! ..but it won't work in IE6 :-/
Reply With Quote
  #6  
Old 11-16-2006, 12:22 AM
plingscore_jonas plingscore_jonas is offline
Junior Member
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 7
Default

Quote:
Originally Posted by jamesm
thanks for the patch!! ..but it won't work in IE6 :-/
Thats strange, it works for me both in IE6 and FF.

If you test it on a local machine on IE, note that you have to get rid of that nasty yellow field on top of the screen to make it execute the script!

// Jonas
Reply With Quote
  #7  
Old 11-16-2006, 12:26 AM
jamesm jamesm is offline
Junior Member
 
Join Date: Nov 2006
Posts: 7
Default

hmm. the script seems to be working fine, but it's being displayed below the select boxes.
Reply With Quote
  #8  
Old 11-16-2006, 01:27 AM
plingscore_jonas plingscore_jonas is offline
Junior Member
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 7
Cool IE Bug

Well thats a known bug in IE. I stumbled across a solution to that problem once, and its a strange one. Try the following

In the section where the calendar-table is generated, do the following changes:
1) Change the id of the table from "fc" to "fc2"

2) Add the following code BEFORE the table:
Code:
document.write('<div id="fc" style="position:absolute;width:162px;height:180px;display:none;z-index:100">'); document.write('<iframe frameborder="0" style="position:absolute;width:162px;height:180px;"></iframe>'); document.write('<div style="position:relative;width:162px;height:180px;">');
3) Add the following code AFTER the for-loop and after the table is ended:
Code:
document.write('</div></div>');
This is a trick to overlap SELECT-boxes in IE. I guess you have to tweak it a bit to make it look good.

// Jonas
Reply With Quote
  #9  
Old 11-16-2006, 07:45 PM
jamesm jamesm is offline
Junior Member
 
Join Date: Nov 2006
Posts: 7
Default

:-/ that wouldn't work in firefox..
Reply With Quote
  #10  
Old 12-14-2006, 06:21 PM
bradhaydon bradhaydon is offline
Junior Member
 
Join Date: Dec 2006
Posts: 1
Default

I have added z-index:100; style directly to the table, which seems to work fine in Firefox2 and Safari.

Just replace

Code:
document.write('<table id="fc" style="position:absolute;border-collapse:collapse;background:#FFFFFF;border:1px solid #ABABAB;display:none" cellpadding=2>'); document.write('<tr><td style="cursor:pointer" onclick="csubm()"><img src="arrowleftmonth.gif"></td><td colspan=5 id="mns" align="center" style="font:bold 13px Arial"></td><td align="right" style="cursor:pointer" onclick="caddm()"><img src="arrowrightmonth.gif"></td></tr>'); document.write('<tr><td align=center style="background:#ABABAB;font:12px Arial">S</td><td align=center style="background:#ABABAB;font:12px Arial">M</td><td align=center style="background:#ABABAB;font:12px Arial">T</td><td align=center style="background:#ABABAB;font:12px Arial">W</td><td align=center style="background:#ABABAB;font:12px Arial">T</td><td align=center style="background:#ABABAB;font:12px Arial">F</td><td align=center style="background:#ABABAB;font:12px Arial">S</td></tr>');
with

Code:
document.write('<table id="fc" style="z-index:100;position:absolute;border-collapse:collapse;background:#FFFFFF;border:1px solid #333;display:none" cellpadding=2>'); document.write('<tr><td style="cursor:pointer" onclick="csubm()"><img src="arrowleftmonth.gif"></td><td colspan=5 id="mns" align="center" style="font:bold 13px Arial"></td><td align="right" style="cursor:pointer" onclick="caddm()"><img src="arrowrightmonth.gif"></td></tr>'); document.write('<tr><td align=center style="background:#ABABAB;font:12px Arial">S</td><td align=center style="background:#ABABAB;font:12px Arial">M</td><td align=center style="background:#ABABAB;font:12px Arial">T</td><td align=center style="background:#ABABAB;font:12px Arial">W</td><td align=center style="background:#ABABAB;font:12px Arial">T</td><td align=center style="background:#ABABAB;font:12px Arial">F</td><td align=center style="background:#ABABAB;font:12px Arial">S</td></tr>');
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 08:02 PM.