Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > Integration > Wordpress

Wordpress Information about integrating the calendar with the Wordpress Content Management System.

Closed Thread
 
Thread Tools Search this Thread Display Modes

AJAX Validation Woes? Here's the Solution (XHTML 1.0 Transitional)
Old 11-30-2007, 07:05 PM   #1
VosSavant
Calendar User
 
VosSavant is offline
Join Date: Nov 2007
Posts: 6
Default AJAX Validation Woes? Here's the Solution (XHTML 1.0 Transitional)

If anyone else should happen to use the AJAX calendar in version 6 and have validation problems, the solution follows.

When you place the call to the calendar in the header, it loads a JavaScript snippet into your XHTML header. XHTML treats scripts as normal syntax, so the W3C validator will tell you you need to encode the carat symbols and ampersands in the JavaScript. This obviously isn't a solution, because then your JavaScript won't work!

So, the simple solution is to add CDATA comment tags so the browser knows to ignore everything between. If you're using the AJAX calendar, add the following tags (in red) around line 137 and 155 of calendar/calendar.php:

// AJAX JAVASCRIPT
if ($EPCAJAX==1) {
?>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
...javascript...
//--><!]]>
</script>
<?php
}

The bottom line: if the validator hassles you about bad syntax within a JavaScript snippet, just comment it out like that.

VosSavant
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid Markup Problem - XHTML 1.0 Transitional VosSavant Wordpress 3 11-30-2007 06:56 PM
Xhtml Strict Validation problem trigger_tre General Support 10 12-14-2006 06:28 AM
XHTML 1.0 Valid Coding usermanual General Support 9 01-10-2005 03:28 PM



All times are GMT -4. The time now is 09:08 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |