scrubbicus Posted March 1, 2009 Share Posted March 1, 2009 I've got a calendar that I've been messing around with that's built inside a class. What I originally wanted and made was an HTML calendar with javascript over the numbers so that when someone hovers over it they get a tooltip of what's going on that day, each of the locations in the javascript code is a php include() so that I can edit the individual tooltips externally. I decided I've been trying to get better at PHP so why not try out a calendar. So I have that calendar and I want that same thing to happen, the javascript works just fine, each number after iterated throughout the calendar gives me a tooltip but I can't seem to tweak it enough to get that tooltip to be a phpinclude() file. Here's my a snippet of the calendar, this example is for Day 1 if($day == 1) { $link = "<a href=\"#\" onMouseover=\"ddrivetip('TOOLTIP INFO HERE','#b687db', 150)\"; onMouseout=\"hideddrivetip()\">"; } I've tried so many different things, I've tried creating a function in that class that I can call from outside with the include file() so that the information is outside the class but gets called into it with the information from the include file already. I've tried creating variables inside the class and putting them in this function. Static variables. Variables from outside the class. If I can get any help it be appreciated. Thanks. Link to comment https://forums.phpfreaks.com/topic/147370-solved-include-in-classes/ Share on other sites More sharing options...
trq Posted March 1, 2009 Share Posted March 1, 2009 if($day == 1) { $link = "<a href=\"#\" onMouseover=\"ddrivetip('" . file_get_contents('include.php') . "','#b687db', 150)\"; onMouseout=\"hideddrivetip()\">"; } Link to comment https://forums.phpfreaks.com/topic/147370-solved-include-in-classes/#findComment-773613 Share on other sites More sharing options...
scrubbicus Posted March 1, 2009 Author Share Posted March 1, 2009 Thanks. Works like a charm. Link to comment https://forums.phpfreaks.com/topic/147370-solved-include-in-classes/#findComment-773651 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.