Welcome Guest, Not a member yet? Register   Sign In
calendar class problem
#1

[eluser]tsan[/eluser]
I have a problem with calendar class when I use next/previous month links. First everything is ok and link goes to right controller, named addsport. selectmonth is a function in addsport controller and 2006 is year and 06 in month as function call parameters.

a href="addsport/selectmonth/2006/06

For next month link is also correct

a href="addsport/selectmonth/2006/08

On selectmonth function I echoed to see that function receives data. Year and month is passed to function correctly. Problem is when I generate
calendar again with next or prev month selected. I just call
$this->createcalendar($year, $month);

Calendar looks ok and with correct year and month, but next/prev links are not working correctly any more. On html source links are ok, but still browser goes to wrong address. New calendar href on source:

selectmonth/2006/07
selectmonth/2006/09

Still if I click next/prev link browser goes to
addsport/selectmonth/2006/selectmonth/2006/09

It is sort of double. Seems to be the same with IE7, safari and firefox. I tested autoloading (CI) session and without session and did not notice difference. Browser goes to wrong address for some reason. What it could be? I'm new to CI so perhaps some simple mistake. I tried search to find answer but couldn't find.
#2

[eluser]sophistry[/eluser]
does this thread help... seems to be a solution at the bottom
#3

[eluser]tsan[/eluser]
Thanks, that fix it. Also array that makes days as links has to use site_url function. Then day links are working also.

$daylinks = array(
1 => site_url('addsport/selectday/1/'),
2 => site_url('addsport/selectday/2/')
);




Theme © iAndrew 2016 - Forum software by © MyBB