change state of date

change state of date

Postby johannes » Tue Mar 11, 2008 11:03 pm

Hi Chris

Your calender script seems to be excatly what I've searched for. :lol:
Yet I'm struggeling with the installation. By clicking on a certain date, the state doesn't change without reloading the page. The calendar is temporarily located on http://koba-arch.ch/holiday.
What could be the problem? Are there any special settings on the webserver requiered? :?:
For any help I thank in advance.
Johannes
johannes
 
Posts: 3
Joined: Tue Mar 11, 2008 10:27 pm

Re: change state of date

Postby chris » Wed Mar 12, 2008 3:24 am

Hi there,
Thanks for the comments, I hope you can get this working ;)

I have just checked your link and, as far as I can see, it appears to be working correctly in Firefox. However, there is a problem in IE7 which is due to a small error in the date links.
Find the code :
Code: Select all
<a href="javascript:void;" onclick="ajax_mod_state( ....

and replace with this:
Code: Select all
<a href="javascript:ajax_mod_state( ....


This is an error in my zipped version which I must update ASAP - sorry about this :(

See if changing this line solves your problem.

Chris
User avatar
chris
Site Admin
 
Posts: 1088
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: change state of date

Postby johannes » Wed Mar 12, 2008 10:25 pm

Hi Chris
Thanx for the quick reply.
Yes, I'm using IE7.
Well, the little change didn't have any effect. :( I also tried
Code: Select all
<a href="#" onClick="ajax_mod_state(...
with the same result.
When I click on the date/link I always get the same javascript error message:
system error:1072896658.

Now, the funny thing is that on your site http://www.cbolson.com/code/availability-calendar/ my browser hasn't any problem. ;) Is there any difference in the code? :?:
johannes
 
Posts: 3
Joined: Tue Mar 11, 2008 10:27 pm

Re: change state of date

Postby chris » Thu Mar 13, 2008 1:33 am

OK, I can now see the problem in your version.

A google check for this error comes up results that blame it on the charset.

I must admit that this is not something that I am hot on but it appears that your server or code is not using the uft-8 charset.

Can you try adding this line:
Code: Select all
header('Content-Type: text/html; charset=utf-8');
at the beginning of the update_cal.ajax.php file (directly after the opening php tag). This should force the output to be encoded lcorrectly.

Let me know if this works :)

Chris
edit:
also try adding this header aswell/instead of the other one I mentioned:
Code: Select all
header('Content-type: text/plain");
- I might be due to this.
User avatar
chris
Site Admin
 
Posts: 1088
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: change state of date

Postby johannes » Thu Mar 13, 2008 10:07 pm

Hi Chris

Yes, that's it:
Code: Select all
header('Content-Type: text/html; charset=utf-8');

Now, it's working fine! Thanks a lot! :D
johannes
 
Posts: 3
Joined: Tue Mar 11, 2008 10:27 pm


Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron