Previous Thread
Next Thread
Print Thread
Rate Thread
gotoubb #209799 11/15/2001 1:49 PM
Joined: May 2001
Posts: 13
Newbie
Newbie
Offline
Joined: May 2001
Posts: 13
In the end of the HTML that makes the calendar appear, just add the following code:

<DIV ID="[:blue]unique event identifier" STYLE="position: absolute; z-index: 20; visibility: hidden; top: 0px; left: 0px;">
<TABLE BORDER="0" WIDTH="30%"><TR><TD BGCOLOR="#000000">
<TABLE BORDER="0" WIDTH="100%"><TR><TD BGCOLOR="#FFFFFF">
[:blue]The event info you want to include</TD></TR></TABLE>
</TD></TR></TABLE>
</DIV>

This will cauuse the layer to be displayed in a nice black border (the table effects). There are other ways to accomplish this, but that will work.

For the links on the calendar, add the following to the <A> tag:

onMouseOver="show('[:blue]The ID you gave the layer for this event'); return true;" onMouseOut="hide('[:blue]The ID you gave the layer for this event'); return true;"

Note you can have more events in the onMouseOver and onMouseOut if you want, just make sure those are listed.

Finally, include the following at the top of the page:

[:blue]<SCRIPT LANGUAGE="JavaScript">
<!--

NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;

function show ( name )
{
x = currentX;
y = currentY + 20;
if ( NS4 )
{
var docWidth = document.width;
var docHeight = document.height;
var layerWidth = document.layers[name].clip.width;
var layerHeight = document.layers[name].clip.height;
if ( ( currentX + layerWidth ) >= docWidth )
{
x = ( currentX - layerWidth );
}
else
{
x = currentX;
}
if ( ( currentY + layerHeight ) >= docHeight )
{
y = ( currentY - layerHeight - 20 );
}
else
{
y=currentY+20;
}
document.layers[name].xpos = parseInt ( x );
document.layers[name].left = parseInt ( x );
document.layers[name].ypos = parseInt ( y );
document.layers[name].top = parseInt ( y );
document.layers[name].visibility = "show";
}
else
{
var docHeight = document.body.offsetHeight;
var docWidth = document.body.offsetWidth;
var layerWidth = document.all[name].offsetWidth;
var layerHeight = document.all[name].offsetHeight;
if ( ( currentX + layerWidth ) > docWidth )
{
x = ( currentX - layerWidth );
}
else
{
x = currentX;
}
if ( ( currentY + layerHeight ) >= docHeight )
{
y = ( currentY - layerHeight - 20 );
}
else
{
y = currentY + 20;
}
document.all[name].style.left = parseInt ( x );
document.all[name].style.top = parseInt ( y );
document.all[name].style.visibility = "visible";
}
}

function hide ( name )
{
if (NS4)
{
document.layers[name].visibility = "hide";
}
else
{
document.all[name].style.visibility = "hidden";
}
}

currentX = currentY = 0;

function grabEl(e)
{
if ( NS4 )
{
currentX = e.pageX;
currentY = e.pageY;
}
else
{
currentX = event.x;
currentY = event.y;
}
}

if ( NS4 )
{
document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
}

document.onmousemove = grabEl;

//-->

</SCRIPT>

Note that I didn't write all this myself, it's freely available out there in script libraries on the web. I hate taking credit where it isn't due []https://www.ubbdev.com/threads/php/images/icons/wink.gif[/]

Sponsored Links
Entire Thread
Subject Posted By Posted
Calendar Features Requests poil 04/06/2001 11:15 PM
Re: Calendar Features Requests The Team 04/07/2001 12:10 AM
Re: Calendar Features Requests poil 04/09/2001 6:46 PM
Re: Calendar Features Requests pluto_rogue 04/09/2001 7:37 PM
Re: Calendar Features Requests poil 04/09/2001 8:31 PM
Re: Calendar Features Requests The Team 04/09/2001 9:23 PM
Re: Calendar Features Requests poil 04/09/2001 9:57 PM
Re: Calendar Features Requests MrFrog 07/23/2001 7:01 AM
Re: Calendar Features Requests MrFrog 08/13/2001 3:42 AM
Any word? MrFrog 08/27/2001 3:28 AM
Re: Calendar Features Requests kcweb 09/14/2001 4:08 PM
Re: Calendar Features Requests AllenAyres 11/14/2001 7:13 PM
Re: Calendar Features Requests poil 11/14/2001 11:14 PM
Re: Calendar Features Requests AllenAyres 11/14/2001 11:44 PM
Re: Calendar Features Requests poil 11/14/2001 11:48 PM
Re: Calendar Features Requests AllenAyres 11/15/2001 5:17 AM
Re: Calendar Features Requests Gamejag 11/15/2001 2:02 PM
Re: Calendar Features Requests AllenAyres 11/15/2001 4:23 PM
To do pop-ups Gamejag 11/15/2001 8:49 PM
Needs list Gamejag 11/16/2001 6:55 PM
Re: Needs list AllenAyres 11/16/2001 8:47 PM
Re: Needs list Gamejag 11/19/2001 1:52 PM
Re: Needs list Gamejag 11/19/2001 4:13 PM
Re: Needs list Rick 11/19/2001 5:08 PM
Re: Needs list Gamejag 11/19/2001 6:08 PM
Re: Needs list AllenAyres 11/25/2001 5:11 AM
Re: Needs list Gamejag 11/26/2001 2:26 PM
Re: Needs list Gamejag 11/29/2001 3:45 PM
Re: Needs list AllenAyres 11/29/2001 5:05 PM
Wowwww! Max Fisch 11/29/2001 5:08 PM
Re: Wowwww! ExcelsiorDDZ 02/01/2002 6:08 AM
Re: Wowwww! Max Fisch 02/04/2002 6:15 AM
Re: Wowwww! JustDave 02/04/2002 6:20 AM
Re: Wowwww! Max Fisch 02/06/2002 5:20 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)